ObjFW  Diff

Differences From Artifact [89818a2387]:

To Artifact [055b4111d5]:


269
270
271
272
273
274
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
308
309
310
311
312
313
314
315
	return [dictionary keyEnumerator];
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count
{
	OFAutoreleasePool *pool = state->extra.pointers[0];
	OFEnumerator *enumerator = state->extra.pointers[1];
	int i;

	state->itemsPtr = objects;
	state->mutationsPtr = (unsigned long*)self;

	if (state->state == -1)
		return 0;

	if (state->state == 0) {
		pool = [[OFAutoreleasePool alloc] init];
		enumerator = [dictionary keyEnumerator];

		state->extra.pointers[0] = pool;
		state->extra.pointers[1] = enumerator;

		state->state = 1;
	}

	for (i = 0; i < count; i++) {
		id object = [enumerator nextObject];

		if (object == nil) {
			[pool release];
			state->state = -1;
			return i;
		}

		objects[i] = object;
	}

	return count;
}

#ifdef OF_HAVE_BLOCKS
- (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block
{
	[dictionary enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
	    BOOL *stop) {







<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







269
270
271
272
273
274
275



276
277



























278
279
280
281
282
283
284
285
	return [dictionary keyEnumerator];
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count
{



	return [dictionary countByEnumeratingWithState: state
					       objects: objects



























						 count: count];
}

#ifdef OF_HAVE_BLOCKS
- (void)enumerateObjectsUsingBlock: (of_set_enumeration_block_t)block
{
	[dictionary enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
	    BOOL *stop) {