ObjFW  Diff

Differences From Artifact [3a4355d0c4]:

To Artifact [c5697552c0]:


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

- (OFString*)componentsJoinedByString: (OFString*)separator
{
	OFAutoreleasePool *pool;
	OFString *str;
	OFObject **objs = [array cArray];
	size_t i, count = [array count];
	Class cls;
	IMP append;

	if (count == 0)
		return @"";
	if (count == 1)
		return [objs[0] description];

	str = [OFMutableString string];
	cls = [OFString class];
	append = [str methodForSelector: @selector(appendString:)];

	pool = [[OFAutoreleasePool alloc] init];

	for (i = 0; i < count - 1; i++) {
		if (![objs[i] isKindOfClass: cls])
			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		append(str, @selector(appendString:), [objs[i] description]);
		append(str, @selector(appendString:), separator);

		[pool releaseObjects];
	}
	append(str, @selector(appendString:), [objs[i] description]);








<








<





<
<
<
<







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

- (OFString*)componentsJoinedByString: (OFString*)separator
{
	OFAutoreleasePool *pool;
	OFString *str;
	OFObject **objs = [array cArray];
	size_t i, count = [array count];

	IMP append;

	if (count == 0)
		return @"";
	if (count == 1)
		return [objs[0] description];

	str = [OFMutableString string];

	append = [str methodForSelector: @selector(appendString:)];

	pool = [[OFAutoreleasePool alloc] init];

	for (i = 0; i < count - 1; i++) {




		append(str, @selector(appendString:), [objs[i] description]);
		append(str, @selector(appendString:), separator);

		[pool releaseObjects];
	}
	append(str, @selector(appendString:), [objs[i] description]);