Differences From Artifact [95bb1cf3d0]:
- File
src/OFDictionary.m
— part of check-in
[6214a3be25]
at
2011-07-22 17:03:22
on branch trunk
— Improve methods using blocks in OFDictionary.
Mutations during enumerations using blocks are now always detected,
even for methods such as -[filteredDictionaryUsingBlock:]. (user: js, size: 20656) [annotate] [blame] [check-ins using]
To Artifact [39169fee1e]:
- File
src/OFDictionary.m
— part of check-in
[bfb7745f95]
at
2011-07-28 20:50:09
on branch trunk
— Don't create and release a pool in -[enumerateObjectsUsingBlock:].
This would make it impossible to use autoreleased objects after the
block has been executed without manually retaining and releasing them. (user: js, size: 20540) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
730 731 732 733 734 735 736 | return i; } #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { | < | | < < < < < | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | return i; } #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { size_t i; BOOL stop = NO; for (i = 0; i < size && !stop; i++) if (data[i] != NULL && data[i] != DELETED) block(data[i]->key, data[i]->object, &stop); } - (OFDictionary*)mappedDictionaryUsingBlock: (of_dictionary_map_block_t)block { OFMutableDictionary *new = [OFMutableDictionary dictionary]; [self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object, |
︙ | ︙ |