Differences From Artifact [7ccafaf30f]:
- File src/OFMapTable.m — part of check-in [d7b691c402] at 2013-12-01 12:12:23 on branch trunk — Make OFMapTableEnumeratorWrapper private. (user: js, size: 16727) [annotate] [blame] [check-ins using]
To Artifact [8882363f15]:
- File
src/OFMapTable.m
— part of check-in
[fa6496efc7]
at
2013-12-05 17:48:11
on branch trunk
— Make coding style consistent.
A file documenting the coding style will be written soon. This will
hopefully prevent conflicts in the future, such as whether static
functions are written in camelCase or_with_underscores, like was the
case here. (user: js, size: 16715) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
35 36 37 38 39 40 41 | struct of_map_table_bucket { void *key, *value; uint32_t hash; }; static struct of_map_table_bucket deleted = {}; static void* | | | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | struct of_map_table_bucket { void *key, *value; uint32_t hash; }; static struct of_map_table_bucket deleted = {}; static void* defaultRetain(void *value) { return value; } static void defaultRelease(void *value) { } static uint32_t defaultHash(void *value) { return (uint32_t)(uintptr_t)value; } static bool defaultEqual(void *value1, void *value2) { return (value1 == value2); } @interface OFMapTable (OF_PRIVATE_CATEGORY) - (void)OF_setValue: (void*)value forKey: (void*)key |
︙ | ︙ | |||
124 125 126 127 128 129 130 | _keyFunctions = keyFunctions; _valueFunctions = valueFunctions; #define SET_DEFAULT(var, value) \ if (var == NULL) \ var = value; | | | | | | | | | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | _keyFunctions = keyFunctions; _valueFunctions = valueFunctions; #define SET_DEFAULT(var, value) \ if (var == NULL) \ var = value; SET_DEFAULT(_keyFunctions.retain, defaultRetain); SET_DEFAULT(_keyFunctions.release, defaultRelease); SET_DEFAULT(_keyFunctions.hash, defaultHash); SET_DEFAULT(_keyFunctions.equal, defaultEqual); SET_DEFAULT(_valueFunctions.retain, defaultRetain); SET_DEFAULT(_valueFunctions.release, defaultRelease); SET_DEFAULT(_valueFunctions.hash, defaultHash); SET_DEFAULT(_valueFunctions.equal, defaultEqual); #undef SET_DEFAULT if (capacity > UINT32_MAX / sizeof(*_buckets) || capacity > UINT32_MAX / 8) @throw [OFOutOfRangeException exception]; |
︙ | ︙ |