ObjFW  Diff

Differences From Artifact [7499aebd7d]:

To Artifact [754d91375c]:


102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

	[super dealloc];
}

- (OFINICategory*)categoryForName: (OFString*)name
{
	void *pool = objc_autoreleasePoolPush();
	OFEnumerator *enumerator = [_categories objectEnumerator];
	OFINICategory *category;

	while ((category = [enumerator nextObject]) != nil) {
		if ([[category name] isEqual: name]) {
			OFINICategory *ret = [category retain];

			objc_autoreleasePoolPop(pool);

			return [ret autorelease];
		}







<


|







102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118

	[super dealloc];
}

- (OFINICategory*)categoryForName: (OFString*)name
{
	void *pool = objc_autoreleasePoolPush();

	OFINICategory *category;

	for (category in _categories) {
		if ([[category name] isEqual: name]) {
			OFINICategory *ret = [category retain];

			objc_autoreleasePoolPop(pool);

			return [ret autorelease];
		}
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

- (void)writeToFile: (OFString*)path
	   encoding: (of_string_encoding_t)encoding
{
	void *pool = objc_autoreleasePoolPush();
	OFFile *file = [OFFile fileWithPath: path
				       mode: @"w"];
	OFEnumerator *enumerator = [_categories objectEnumerator];
	OFINICategory *category;
	bool first = true;

	while ((category = [enumerator nextObject]) != nil)
		if ([category OF_writeToStream: file
				      encoding: encoding
					 first: first])
			first = false;

	objc_autoreleasePoolPop(pool);
}
@end







<
<


|








184
185
186
187
188
189
190


191
192
193
194
195
196
197
198
199
200
201

- (void)writeToFile: (OFString*)path
	   encoding: (of_string_encoding_t)encoding
{
	void *pool = objc_autoreleasePoolPush();
	OFFile *file = [OFFile fileWithPath: path
				       mode: @"w"];


	bool first = true;

	for (OFINICategory *category in _categories)
		if ([category OF_writeToStream: file
				      encoding: encoding
					 first: first])
			first = false;

	objc_autoreleasePoolPop(pool);
}
@end