Differences From Artifact [c767975d02]:
- File
src/runtime/selector.m
— part of check-in
[345eb93240]
at
2012-07-17 01:09:50
on branch trunk
— Rename ERROR() to OBJC_ERROR().
ERROR seems to be defined on MinGW32 and it's likely that it's also used
on other systems, thus it's better to prefix it with OBJC_. (user: js, size: 2866) [annotate] [blame] [check-ins using]
To Artifact [80ce19c002]:
- File src/runtime/selector.m — part of check-in [9741a3d43b] at 2012-12-26 15:25:35 on branch trunk — selector.m: Correctly check for slot exhaustion. (user: js, size: 2866) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | void objc_register_selector(struct objc_abi_selector *sel) { struct objc_selector *rsel; const char *name; if (selectors == NULL) selectors = objc_hashtable_new(2); else if ((rsel = objc_hashtable_get(selectors, sel->name)) != NULL) { ((struct objc_selector*)sel)->uid = rsel->uid; return; } if (selector_names == NULL) selector_names = objc_sparsearray_new(); name = sel->name; rsel = (struct objc_selector*)sel; rsel->uid = selectors_cnt++; | > > > < < < | 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 | void objc_register_selector(struct objc_abi_selector *sel) { struct objc_selector *rsel; const char *name; if (selectors_cnt > SEL_MAX) OBJC_ERROR("Out of selector slots!"); if (selectors == NULL) selectors = objc_hashtable_new(2); else if ((rsel = objc_hashtable_get(selectors, sel->name)) != NULL) { ((struct objc_selector*)sel)->uid = rsel->uid; return; } if (selector_names == NULL) selector_names = objc_sparsearray_new(); name = sel->name; rsel = (struct objc_selector*)sel; rsel->uid = selectors_cnt++; objc_hashtable_set(selectors, name, rsel); objc_sparsearray_set(selector_names, (uint32_t)rsel->uid, name); } SEL sel_registerName(const char *name) { |
︙ | ︙ |