ObjFW  Diff

Differences From Artifact [03e4be362e]:

To Artifact [626ce7ee3d]:


563
564
565
566
567
568
569
570

571
572
573

574
575

576
577

578
579




580
581
582


583
584
585

586
587
588
589
590
591
592
563
564
565
566
567
568
569

570
571


572
573

574
575
576
577


578
579
580
581
582


583
584
585
586

587
588
589
590
591
592
593
594







-
+

-
-
+

-
+


+
-
-
+
+
+
+

-
-
+
+


-
+







	[new makeImmutable];

	return new;
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count_
			     count: (int)count
{
	/* FIXME: Use -[getObjects:inRange:] on the passed objects */
	size_t count = [self count];
	of_range_t range = of_range(state->state, count);

	if (count > INT_MAX)
	if (range.length > SIZE_MAX - range.location)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	if (range.location + range.length > [self count])
	if (state->state >= count)
		return 0;
		range.length = [self count] - range.location;

	[self getObjects: objects
		 inRange: range];

	state->state = count;
	state->itemsPtr = [self objects];
	state->state = range.location + range.length;
	state->itemsPtr = objects;
	state->mutationsPtr = (unsigned long*)self;

	return (int)count;
	return (int)range.length;
}

- (OFEnumerator*)objectEnumerator
{
	return [[[OFArrayEnumerator alloc] initWithArray: self
					    mutationsPtr: NULL] autorelease];
}