Differences From Artifact [c66bc3b5e1]:
- File
src/OFDictionary_hashtable.m
— part of check-in
[2de15db195]
at
2013-03-01 21:19:02
on branch trunk
— Rethrow some exceptions to fix class.
This way, the error message will show the called class instead of the
class used internally. (user: js, size: 9242) [annotate] [blame] [check-ins using]
To Artifact [df272a2515]:
- File
src/OFDictionary_hashtable.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 9242) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
51 52 53 54 55 56 57 | static uint32_t hash(void *value) { return [(id)value hash]; } | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | static uint32_t hash(void *value) { return [(id)value hash]; } static bool equal(void *value1, void *value2) { return [(id)value1 isEqual: (id)value2]; } static of_map_table_functions_t keyFunctions = { .retain = copy, |
︙ | ︙ | |||
317 318 319 320 321 322 323 | } - (size_t)count { return [_mapTable count]; } | | | | | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | } - (size_t)count { return [_mapTable count]; } - (bool)isEqual: (id)dictionary { OFDictionary_hashtable *dictionary_; if ([self class] != [OFDictionary_hashtable class] && [self class] != [OFMutableDictionary_hashtable class]) return [super isEqual: dictionary]; dictionary_ = (OFDictionary_hashtable*)dictionary; return [dictionary_->_mapTable isEqual: _mapTable]; } - (bool)containsObject: (id)object { return [_mapTable containsValue: object]; } - (bool)containsObjectIdenticalTo: (id)object { return [_mapTable containsValueIdenticalTo: object]; } - (OFArray*)allKeys { OFArray *ret; |
︙ | ︙ | |||
439 440 441 442 443 444 445 | #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { @try { [_mapTable enumerateKeysAndValuesUsingBlock: | | | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | #ifdef OF_HAVE_BLOCKS - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block { @try { [_mapTable enumerateKeysAndValuesUsingBlock: ^ (void *key, void *value, bool *stop) { block(key, value, stop); }]; } @catch (OFEnumerationMutationException *e) { @throw [OFEnumerationMutationException exceptionWithClass: [self class] object: self]; } |
︙ | ︙ |