ObjFW  Diff

Differences From Artifact [ba2a81b1ec]:

To Artifact [e971f4ddef]:


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
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
427







-
+
+





-
+



+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+







	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;
	of_list_object_t *listObject = state->extra.pointers[0];
	int i;

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

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

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

	objects[0] = (*listObject)->object;
	*listObject = (*listObject)->next;
	return 1;
		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
	    mutationsPointer: &mutations] autorelease];