ObjFW  Diff

Differences From Artifact [a82a35d7aa]:

To Artifact [e7dba343a1]:


139
140
141
142
143
144
145




























146
147
148
149
150
151
152
			hasColon = true;

		UTF8String++;
	}

	return hasColon;
}





























@implementation OFURIAllowedCharacterSetBase
- (instancetype)autorelease
{
	return self;
}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
			hasColon = true;

		UTF8String++;
	}

	return hasColon;
}

OFURI *
OFURIForFileInArchive(OFString *scheme, OFString *path, OFURI *archive)
{
	static OFOnceControl onceControl = OFOnceControlInitValue;
	OFMutableURI *URI = [OFMutableURI URI];
	void *pool = objc_autoreleasePoolPush();
	OFString *archiveURI;

	OFOnce(&onceControl,
	    initURIPathAllowedCharacterSetWithoutExclamationMark);

	path = [path stringByAddingPercentEncodingWithAllowedCharacters:
	    URIPathAllowedCharacterSetWithoutExclamationMark];
	archiveURI = [archive.string
	    stringByAddingPercentEncodingWithAllowedCharacters:
	    URIPathAllowedCharacterSetWithoutExclamationMark];

	URI.scheme = scheme;
	URI.percentEncodedPath = [OFString stringWithFormat: @"%@!%@",
							     archiveURI, path];

	[URI makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URI;
}

@implementation OFURIAllowedCharacterSetBase
- (instancetype)autorelease
{
	return self;
}

443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
+ (OFCharacterSet *)URIFragmentAllowedCharacterSet
{
	OFOnce(&URIQueryOrFragmentAllowedCharacterSetOnce,
	    initURIQueryOrFragmentAllowedCharacterSet);

	return URIQueryOrFragmentAllowedCharacterSet;
}

+ (OFCharacterSet *)of_URIPathAllowedCharacterSetWithoutExclamationMark
{
	static OFOnceControl onceControl = OFOnceControlInitValue;
	OFOnce(&onceControl,
	    initURIPathAllowedCharacterSetWithoutExclamationMark);

	return URIPathAllowedCharacterSetWithoutExclamationMark;
}
@end

@implementation OFURI
+ (instancetype)URI
{
	return [[[self alloc] init] autorelease];
}







<
<
<
<
<
<
<
<
<







471
472
473
474
475
476
477









478
479
480
481
482
483
484
+ (OFCharacterSet *)URIFragmentAllowedCharacterSet
{
	OFOnce(&URIQueryOrFragmentAllowedCharacterSetOnce,
	    initURIQueryOrFragmentAllowedCharacterSet);

	return URIQueryOrFragmentAllowedCharacterSet;
}









@end

@implementation OFURI
+ (instancetype)URI
{
	return [[[self alloc] init] autorelease];
}