ObjFW  Diff

Differences From Artifact [6f860bcc98]:

To Artifact [81bd62a18e]:


38
39
40
41
42
43
44



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59




60
61
62
63
64
65
66
	return [[[self alloc] init] autorelease];
}

- (void)setScheme: (OFString *)scheme
{
	void *pool = objc_autoreleasePoolPush();
	OFString *old = _percentEncodedScheme;




	_percentEncodedScheme = [[scheme.lowercaseString
	    stringByAddingPercentEncodingWithAllowedCharacters:
	    [OFCharacterSet URISchemeAllowedCharacterSet]] copy];

	[old release];

	objc_autoreleasePoolPop(pool);
}

- (void)setPercentEncodedScheme: (OFString *)percentEncodedScheme
{
	void *pool = objc_autoreleasePoolPush();
	OFString *old = _percentEncodedScheme;





	if (percentEncodedScheme != nil)
		OFURIVerifyIsEscaped(percentEncodedScheme,
		    [OFCharacterSet URISchemeAllowedCharacterSet]);

	_percentEncodedScheme = [percentEncodedScheme.lowercaseString copy];

	[old release];







>
>
>















>
>
>
>







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	return [[[self alloc] init] autorelease];
}

- (void)setScheme: (OFString *)scheme
{
	void *pool = objc_autoreleasePoolPush();
	OFString *old = _percentEncodedScheme;

	if (scheme.length < 1 || !OFASCIIIsAlpha(*scheme.UTF8String))
		@throw [OFInvalidFormatException exception];

	_percentEncodedScheme = [[scheme.lowercaseString
	    stringByAddingPercentEncodingWithAllowedCharacters:
	    [OFCharacterSet URISchemeAllowedCharacterSet]] copy];

	[old release];

	objc_autoreleasePoolPop(pool);
}

- (void)setPercentEncodedScheme: (OFString *)percentEncodedScheme
{
	void *pool = objc_autoreleasePoolPush();
	OFString *old = _percentEncodedScheme;

	if (percentEncodedScheme.length < 1 ||
	    !OFASCIIIsAlpha(*percentEncodedScheme.UTF8String))
		@throw [OFInvalidFormatException exception];

	if (percentEncodedScheme != nil)
		OFURIVerifyIsEscaped(percentEncodedScheme,
		    [OFCharacterSet URISchemeAllowedCharacterSet]);

	_percentEncodedScheme = [percentEncodedScheme.lowercaseString copy];

	[old release];