231
232
233
234
235
236
237
238
|
- (OFEnumerator*)enumerator
{
return [[[OFArrayEnumerator alloc]
initWithDataArray: array
mutationsPointer: &mutations] autorelease];
}
@end
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
- (OFEnumerator*)enumerator
{
return [[[OFArrayEnumerator alloc]
initWithDataArray: array
mutationsPointer: &mutations] autorelease];
}
#ifdef OF_HAVE_BLOCKS
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block
{
OFObject **objs = [array cArray];
size_t i, count = [array count];
BOOL stop = NO;
unsigned long mutations2 = mutations;
for (i = 0; i < count && !stop; i++) {
if (mutations != mutations2)
@throw [OFEnumerationMutationException
newWithClass: isa];
block(objs[i], i, &stop);
}
}
#endif
@end
|