ObjFW  Diff

Differences From Artifact [2082375f0b]:

To Artifact [bc22950fc0]:


58
59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
82







-
+









-
+







	[URL makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URL;
}

- init
- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)of_init
{
	return [super init];
}

- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
	char *UTF8String, *UTF8String2 = NULL;

	self = [super init];

	@try {
		void *pool = objc_autoreleasePoolPush();
202
203
204
205
206
207
208
209
210


211
212
213
214
215
216
217
202
203
204
205
206
207
208


209
210
211
212
213
214
215
216
217







-
-
+
+







	} @finally {
		free(UTF8String2);
	}

	return self;
}

- initWithString: (OFString *)string
   relativeToURL: (OFURL *)URL
- (instancetype)initWithString: (OFString *)string
		 relativeToURL: (OFURL *)URL
{
	char *UTF8String, *UTF8String2 = NULL;

	if ([string containsString: @"://"])
		return [self initWithString: string];

	self = [super init];
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
276
277
278
279
280
281
282

283
284
285
286
287
288
289
290







-
+







	} @finally {
		free(UTF8String2);
	}

	return self;
}

- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
	@try {
		void *pool = objc_autoreleasePoolPush();

		if (![[element name] isEqual: [self className]] ||
		    ![[element namespace] isEqual: OF_SERIALIZATION_NS])
			@throw [OFInvalidArgumentException exception];
412
413
414
415
416
417
418
419

420
421
422
423
424

425
426
427
428
429
430
431
412
413
414
415
416
417
418

419
420
421
422
423

424
425
426
427
428
429
430
431







-
+




-
+







}

- (OFString *)fragment
{
	return _fragment;
}

- copy
- (id)copy
{
	return [self retain];
}

- mutableCopy
- (id)mutableCopy
{
	OFMutableURL *copy = [[OFMutableURL alloc] init];

	@try {
		[copy setScheme: _scheme];
		[copy setHost: _host];
		[copy setPort: _port];