ObjFW  Diff

Differences From Artifact [5212c0b9d0]:

To Artifact [01663115e7]:


100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
100
101
102
103
104
105
106

107

108
109
110
111
112
113
114







-
+
-







	void *pool = objc_autoreleasePoolPush();
	OFINICategory *category;

	for (category in _categories)
		if ([[category name] isEqual: name])
			return category;

	category = [[[OFINICategory alloc] of_init] autorelease];
	category = [[[OFINICategory alloc] of_initWithName: name] autorelease];
	[category setName: name];
	[_categories addObject: category];

	objc_autoreleasePoolPop(pool);

	return category;
}

142
143
144
145
146
147
148
149
150

151
152
153
154
155
156
157
141
142
143
144
145
146
147


148
149
150
151
152
153
154
155







-
-
+







			if (![line hasSuffix: @"]"])
				@throw [OFInvalidFormatException exception];

			categoryName = [line substringWithRange:
			    of_range(1, [line length] - 2)];

			category = [[[OFINICategory alloc]
			    of_init] autorelease];
			[category setName: categoryName];
			    of_initWithName: categoryName] autorelease];
			[_categories addObject: category];
		} else {
			if (category == nil)
				@throw [OFInvalidFormatException exception];

			[category of_parseLine: line];
		}