Differences From Artifact [ef50fd350e]:
- File
src/runtime/lookup.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: 2511) [annotate] [blame] [check-ins using]
To Artifact [aeac5b2dcb]:
- File src/runtime/lookup.m — part of check-in [9dfe462848] at 2012-09-06 19:13:50 on branch trunk — Improve selector not found message. (user: js, size: 2533) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 | #import "macros.h" IMP (*objc_forward_handler)(id, SEL) = NULL; IMP objc_not_found_handler(id obj, SEL sel) { | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "macros.h" IMP (*objc_forward_handler)(id, SEL) = NULL; IMP objc_not_found_handler(id obj, SEL sel) { BOOL is_class = object_getClass(obj)->info & OBJC_CLASS_INFO_METACLASS; if (!(object_getClass(obj)->info & OBJC_CLASS_INFO_INITIALIZED)) { Class cls = (is_class ? (Class)obj : object_getClass(obj)); objc_initialize_class(cls); if (!(cls->info & OBJC_CLASS_INFO_SETUP)) { if (is_class) return objc_msg_lookup(nil, sel); |
︙ | ︙ | |||
51 52 53 54 55 56 57 | */ return objc_msg_lookup(obj, sel); } if (objc_forward_handler != NULL) return objc_forward_handler(obj, sel); | | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | */ return objc_msg_lookup(obj, sel); } if (objc_forward_handler != NULL) return objc_forward_handler(obj, sel); OBJC_ERROR("Selector %c[%s] is not implemented for class %s!", (is_class ? '+' : '-'), sel_getName(sel), object_getClassName(obj)); } BOOL class_respondsToSelector(Class cls, SEL sel) { if (cls == Nil) return NO; |
︙ | ︙ |