ObjFW  Diff

Differences From Artifact [e971f4ddef]:

To Artifact [58ae77a2af]:


390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
	return element;
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count_
{
	of_list_object_t *listObject = state->extra.pointers[0];
	int i;

	state->itemsPtr = objects;
	state->mutationsPtr = &mutations;

	if (state->state == 0) {
		listObject = firstListObject;
		state->state = 1;
	}

	for (i = 0; i < count_; i++) {
		if (listObject == NULL) {
			state->extra.pointers[0] = NULL;
			return i;
		}

		objects[i] = listObject->object;
		listObject = listObject->next;
	}

	state->extra.pointers[0] = listObject;

	return count_;
}

- (OFEnumerator*)objectEnumerator
{
	return [[[OFListEnumerator alloc]
		initWithList: self







|






|




|
<

|
<
|
|


<
<







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409

410
411

412
413
414
415


416
417
418
419
420
421
422
	return element;
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count_
{
	of_list_object_t **listObject = (of_list_object_t**)&state->extra[0];
	int i;

	state->itemsPtr = objects;
	state->mutationsPtr = &mutations;

	if (state->state == 0) {
		*listObject = firstListObject;
		state->state = 1;
	}

	for (i = 0; i < count_; i++) {
		if (*listObject == NULL)

			return i;


		objects[i] = (*listObject)->object;
		*listObject = (*listObject)->next;
	}



	return count_;
}

- (OFEnumerator*)objectEnumerator
{
	return [[[OFListEnumerator alloc]
		initWithList: self