Differences From Artifact [2d5ba7013a]:
- File
src/OFObject.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 24893) [annotate] [blame] [check-ins using]
To Artifact [6922597523]:
- File
src/OFObject.m
— part of check-in
[5a6cc94418]
at
2013-03-16 10:13:47
on branch trunk
— Add forwardingTargetForSelector: for AMD64/ELF.
Currently, no methods returning structs are supported, see the comment
in OFObject. (user: js, size: 25593) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
59 60 61 62 63 64 65 | #import "instance.h" #if defined(OF_HAVE_ATOMIC_OPS) # import "atomic.h" #elif defined(OF_HAVE_THREADS) # import "threading.h" #endif | | > > > > > > > > > > | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | #import "instance.h" #if defined(OF_HAVE_ATOMIC_OPS) # import "atomic.h" #elif defined(OF_HAVE_THREADS) # import "threading.h" #endif #if defined(OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR) extern id of_forward(id, SEL, ...); # ifdef OF_APPLE_RUNTIME /* * Forwarding for methods returning structs only works with the Apple ABI, as * with the GNU ABI, there is no way of knowing if a struct is returned and if * so how. * As forwardingTargetForSelector: only works for architectures for which * assembly has been written anyway, it makes sense to switch to * objc_msgSend(_{st,fp}ret) for those architectures to solve this problem. */ extern struct stret of_forward_stret(id, SEL, ...); # endif #endif struct pre_ivar { int32_t retainCount; struct pre_mem *firstMem, *lastMem; #if !defined(OF_HAVE_ATOMIC_OPS) && defined(OF_HAVE_THREADS) of_spinlock_t retainCountSpinlock; |
︙ | ︙ | |||
156 157 158 159 160 161 162 163 164 165 166 167 168 169 | sel_getName(sel)); abort(); } return objc_msg_lookup(obj, sel); } } of_method_not_found(obj, sel); return NULL; } #endif #ifndef HAVE_OBJC_ENUMERATIONMUTATION | > > > > > > > > > > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | sel_getName(sel)); abort(); } return objc_msg_lookup(obj, sel); } } #ifdef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR if (class_respondsToSelector(object_getClass(obj), @selector(forwardingTargetForSelector:))) { id target = [obj forwardingTargetForSelector: sel]; if (target != nil && target != obj) return (IMP)of_forward; } #endif of_method_not_found(obj, sel); return NULL; } #endif #ifndef HAVE_OBJC_ENUMERATIONMUTATION |
︙ | ︙ |