Differences From Artifact [7bf06a0039]:
- File src/OFMutableDictionary.m — part of check-in [63fc941b66] at 2011-07-20 18:23:41 on branch trunk — Remove code duplication for fast enumeration of mutable collections. (user: js, size: 6863) [annotate] [blame] [check-ins using]
To Artifact [e5d16fd400]:
- File
src/OFMutableDictionary.m
— part of check-in
[3b0699b790]
at
2011-07-28 22:21:03
on branch trunk
— Don't create and release a pool in -[enumerateObjectsUsingBlock:].
This fixes the mutable versions reimplementing it and still behaving the
old way. (user: js, size: 6646) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
275 276 277 278 279 280 281 | mutationsPointer: &mutations] autorelease]; } #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { | < | < | < < < < | 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 | mutationsPointer: &mutations] autorelease]; } #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { size_t i; BOOL stop = NO; unsigned long mutations2 = mutations; for (i = 0; i < size && !stop; i++) { if (mutations != mutations2) @throw [OFEnumerationMutationException newWithClass: isa object: self]; if (data[i] != NULL && data[i] != DELETED) block(data[i]->key, data[i]->object, &stop); } } - (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block { size_t i; BOOL stop = NO; unsigned long mutations2 = mutations; for (i = 0; i < size && !stop; i++) { if (mutations != mutations2) @throw [OFEnumerationMutationException |
︙ | ︙ | |||
319 320 321 322 323 324 325 | @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; [new retain]; [data[i]->object release]; data[i]->object = new; | | < | < < < | 313 314 315 316 317 318 319 320 321 322 323 324 | @throw [OFInvalidArgumentException newWithClass: isa selector: _cmd]; [new retain]; [data[i]->object release]; data[i]->object = new; } } } #endif @end |