ObjFW  Diff

Differences From Artifact [ae9145fa4e]:

To Artifact [e8ba92cbd3]:


157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

			*tmp2 = '\0';
			tmp2++;

			host = [[OFString alloc] initWithCString: str_c];

			pool = [[OFAutoreleasePool alloc] init];
			port_str = [[OFString alloc] initWithCString: tmp2];

			if ([port_str decimalValue] > 65535)
				@throw [OFInvalidFormatException
				    newWithClass: isa];

			port = [port_str decimalValue];








|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

			*tmp2 = '\0';
			tmp2++;

			host = [[OFString alloc] initWithCString: str_c];

			pool = [[OFAutoreleasePool alloc] init];
			port_str = [OFString stringWithCString: tmp2];

			if ([port_str decimalValue] > 65535)
				@throw [OFInvalidFormatException
				    newWithClass: isa];

			port = [port_str decimalValue];

314
315
316
317
318
319
320
321
322
323
324
325
326

327
328
329
330
331
332
333
334
335
336
337
338

	if (![url->scheme isEqual: scheme])
		return NO;
	if (![url->host isEqual: host])
		return NO;
	if (url->port != port)
		return NO;
	if (![url->user isEqual: user])
		return NO;
	if (![url->password isEqual: password])
		return NO;
	if (![url->path isEqual: path])
		return NO;

	if (![url->parameters isEqual: parameters])
		return NO;
	if (![url->query isEqual: query])
		return NO;
	if (![url->fragment isEqual: fragment])
		return NO;

	return YES;
}

- (uint32_t)hash
{







|

|



>
|

|

|







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339

	if (![url->scheme isEqual: scheme])
		return NO;
	if (![url->host isEqual: host])
		return NO;
	if (url->port != port)
		return NO;
	if (url->user != user && ![url->user isEqual: user])
		return NO;
	if (url->password != password && ![url->password isEqual: password])
		return NO;
	if (![url->path isEqual: path])
		return NO;
	if (url->parameters != parameters &&
	    ![url->parameters isEqual: parameters])
		return NO;
	if (url->query != query && ![url->query isEqual: query])
		return NO;
	if (url->fragment != fragment && ![url->fragment isEqual: fragment])
		return NO;

	return YES;
}

- (uint32_t)hash
{
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372
373




374
375
376
377
378
379
380
	return hash;
}

- copy
{
	OFURL *new = [[OFURL alloc] init];


	new->scheme = [scheme copy];
	new->host = [host copy];
	new->port = port;
	new->user = [user copy];
	new->password = [password copy];
	new->path = [path copy];
	new->parameters = [parameters copy];
	new->query = [query copy];
	new->fragment = [fragment copy];





	return new;
}

- (OFString*)scheme
{
	OF_GETTER(scheme, YES)







>
|
|
|
|
|
|
|
|
|
>
>
>
>







359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
	return hash;
}

- copy
{
	OFURL *new = [[OFURL alloc] init];

	@try {
		new->scheme = [scheme copy];
		new->host = [host copy];
		new->port = port;
		new->user = [user copy];
		new->password = [password copy];
		new->path = [path copy];
		new->parameters = [parameters copy];
		new->query = [query copy];
		new->fragment = [fragment copy];
	} @catch (id e) {
		[new release];
		@throw e;
	}

	return new;
}

- (OFString*)scheme
{
	OF_GETTER(scheme, YES)