ObjFW  Diff

Differences From Artifact [81309c84e2]:

To Artifact [75df3d0578]:


326
327
328
329
330
331
332
333

334
335

336
337
338
339
340
341
342
343
344
345
346
347
348

349
350
351
352
353
354
355
326
327
328
329
330
331
332

333
334

335
336
337
338
339
340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
355







-
+

-
+












-
+







- (OFString*)stringBySerializing
{
	OFMutableString *ret;
	OFAutoreleasePool *pool;
	of_list_object_t *iter;

	if (count == 0)
		return @"<list,mutable>()";
		return @"(list,mutable)[]";

	ret = [OFMutableString stringWithString: @"<list,mutable>(\n"];
	ret = [OFMutableString stringWithString: @"(list,mutable)[\n"];
	pool = [[OFAutoreleasePool alloc] init];

	for (iter = firstListObject; iter != NULL; iter = iter->next) {
		[ret appendString: [iter->object stringBySerializing]];

		if (iter->next != NULL)
			[ret appendString: @",\n"];

		[pool releaseObjects];
	}
	[ret replaceOccurrencesOfString: @"\n"
			     withString: @"\n\t"];
	[ret appendString: @"\n)"];
	[ret appendString: @"\n]"];

	[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.