ObjFW  Diff

Differences From Artifact [d71bd6e00b]:

To Artifact [7f8c49938a]:


260
261
262
263
264
265
266




































267
268
269
270
271
272
273
	return [[attributes copy] autorelease];
}

- (OFArray*)children
{
	return [[children copy] autorelease];
}





































- (OFString*)_XMLStringWithParent: (OFXMLElement*)parent
{
	OFAutoreleasePool *pool, *pool2;
	char *str_c;
	size_t len, i, j, attrs_count;
	OFString *prefix, *parent_prefix;







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







260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
	return [[attributes copy] autorelease];
}

- (OFArray*)children
{
	return [[children copy] autorelease];
}

- (OFString*)stringValue
{
	OFAutoreleasePool *pool;
	OFMutableString *ret;
	OFXMLElement **children_c;
	size_t i, count = [children count];

	if (count == 0)
		return @"";

	ret = [OFMutableString string];
	children_c = [children cArray];
	pool = [[OFAutoreleasePool alloc] init];

	for (i = 0; i < count; i++) {
		if (children_c[i]->characters != nil)
			[ret appendString: children_c[i]->characters];
		else if (children_c[i]->cdata != nil)
			[ret appendString: children_c[i]->cdata];
		else if (children_c[i]->comment == nil) {
			[ret appendString: [children_c[i] stringValue]];
			[pool releaseObjects];
		}
	}

	[pool release];

	/*
	 * Class swizzle the string to be immutable. We declared the return type
	 * to be OFString*, so it can't be modified anyway. But not swizzling it
	 * would create a real copy each time -[copy] is called.
	 */
	ret->isa = [OFString class];
	return ret;
}

- (OFString*)_XMLStringWithParent: (OFXMLElement*)parent
{
	OFAutoreleasePool *pool, *pool2;
	char *str_c;
	size_t len, i, j, attrs_count;
	OFString *prefix, *parent_prefix;