Overview
Comment: | Add class_getMethodImplementation(). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | runtime |
Files: | files | file ages | folders |
SHA3-256: |
46105d56c7bc52cb5373d8ce862edb4c |
User & Date: | js on 2012-03-23 14:54:19 |
Other Links: | branch diff | manifest | tags |
Context
2012-03-23
| ||
15:42 | rootclass->isa->superclass is rootclass. check-in: aa179b6d0a user: js tags: runtime | |
14:54 | Add class_getMethodImplementation(). check-in: 46105d56c7 user: js tags: runtime | |
12:59 | Move objc_{properties,sync} to runtime. check-in: adbce6d8f4 user: js tags: runtime | |
Changes
Modified src/OFObject.m from [99d74c377b] to [946762df81].
︙ | ︙ | |||
283 284 285 286 287 288 289 | return YES; return NO; } + (IMP)instanceMethodForSelector: (SEL)selector { | < < < < | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | return YES; return NO; } + (IMP)instanceMethodForSelector: (SEL)selector { return class_getMethodImplementation(self, selector); } + (const char*)typeEncodingForInstanceSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) const char *ret; |
︙ | ︙ | |||
515 516 517 518 519 520 521 | - (BOOL)conformsToProtocol: (Protocol*)protocol { return [isa conformsToProtocol: protocol]; } - (IMP)methodForSelector: (SEL)selector { | < < < < | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - (BOOL)conformsToProtocol: (Protocol*)protocol { return [isa conformsToProtocol: protocol]; } - (IMP)methodForSelector: (SEL)selector { return class_getMethodImplementation(isa, selector); } - (id)performSelector: (SEL)selector { id (*imp)(id, SEL) = (id(*)(id, SEL))[self methodForSelector: selector]; return imp(self, selector); |
︙ | ︙ |
Modified src/runtime/class.m from [c6f580ab0e] to [16e53b23a5].
︙ | ︙ | |||
276 277 278 279 280 281 282 | unsigned long class_getInstanceSize(Class cls) { return cls->instance_size; } IMP | | < < < < < < | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | unsigned long class_getInstanceSize(Class cls) { return cls->instance_size; } IMP class_getMethodImplementation(Class cls, SEL sel) { return objc_sparsearray_get(cls->dtable, (uint32_t)sel->uid); } const char* objc_get_type_encoding(Class cls, SEL sel) { |
︙ | ︙ |
Modified src/runtime/runtime.h from [5e1f1b3197] to [a509668aea].
︙ | ︙ | |||
104 105 106 107 108 109 110 | extern Class objc_lookup_class(const char*); extern const char* class_getName(Class); extern Class class_getSuperclass(Class); extern BOOL class_isKindOfClass(Class, Class); extern unsigned long class_getInstanceSize(Class); extern BOOL class_respondsToSelector(Class, SEL); extern BOOL class_conformsToProtocol(Class, Protocol*); | | < | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | extern Class objc_lookup_class(const char*); extern const char* class_getName(Class); extern Class class_getSuperclass(Class); extern BOOL class_isKindOfClass(Class, Class); extern unsigned long class_getInstanceSize(Class); extern BOOL class_respondsToSelector(Class, SEL); extern BOOL class_conformsToProtocol(Class, Protocol*); extern IMP class_getMethodImplementation(Class, SEL); extern IMP class_replaceMethod(Class, SEL, IMP, const char*); extern const char* objc_get_type_encoding(Class, SEL); extern IMP objc_msg_lookup(id, SEL); extern void objc_thread_add(void); extern void objc_thread_remove(void); extern void objc_exit(void); #endif |