Differences From Artifact [0fa5062289]:
- File
src/OFObject.m
— part of check-in
[b7cd1e3dc6]
at
2009-06-09 13:01:51
on branch trunk
— Use #import "*.h" instead of #import <*.h> in objfw.h.
We need this because we don't add the objfw include path to the
CPPFLAGS anymore in objfw-config. (user: js, size: 10090) [annotate] [blame] [check-ins using]
To Artifact [da7bffba83]:
- File src/OFObject.m — part of check-in [c70922ee1c] at 2009-06-09 23:28:44 on branch trunk — Update the dtable so we can replace methods at runtime. (user: js, size: 10350) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | #import "OFObject.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" #import "OFMacros.h" #import <objc/objc-api.h> | | > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #import "OFObject.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" #import "OFMacros.h" #import <objc/objc-api.h> #ifdef __objc_INCLUDE_GNU #import <objc/sarray.h> #else #import <objc/runtime.h> #endif struct pre_ivar { void **memchunks; size_t memchunks_size; size_t retain_count; |
︙ | ︙ | |||
135 136 137 138 139 140 141 142 143 144 145 146 147 148 | newimp = method_get_imp(class_get_instance_method(class, selector)); if (oldimp == (IMP)0 || newimp == (IMP)0) @throw [OFInvalidArgumentException newWithClass: self andSelector: _cmd]; method->method_imp = newimp; return oldimp; #else Method method = class_getInstanceMethod(self, selector); IMP imp = class_getMethodImplementation(class, selector); if (method == NULL || imp == NULL) @throw [OFInvalidArgumentException newWithClass: self | > > > > > > > | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | newimp = method_get_imp(class_get_instance_method(class, selector)); if (oldimp == (IMP)0 || newimp == (IMP)0) @throw [OFInvalidArgumentException newWithClass: self andSelector: _cmd]; method->method_imp = newimp; /* Update the dtable if necessary */ if (sarray_get_safe(((Class)self)->dtable, (sidx)method->method_name->sel_id)) sarray_at_put_safe(((Class)self)->dtable, (sidx)method->method_name->sel_id, method->method_imp); return oldimp; #else Method method = class_getInstanceMethod(self, selector); IMP imp = class_getMethodImplementation(class, selector); if (method == NULL || imp == NULL) @throw [OFInvalidArgumentException newWithClass: self |
︙ | ︙ |