Differences From Artifact [4886f63f00]:
- File src/instance.m — part of check-in [813c00ccf0] at 2013-01-09 22:24:47 on branch trunk — Update copyright. (user: js, size: 1997) [annotate] [blame] [check-ins using]
To Artifact [f378d99417]:
- File
src/instance.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: 1991) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include "config.h" #import "OFObject.h" static SEL cxx_construct = NULL; static SEL cxx_destruct = NULL; | | | | | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #include "config.h" #import "OFObject.h" static SEL cxx_construct = NULL; static SEL cxx_destruct = NULL; static bool call_ctors(Class cls, id obj) { Class super = class_getSuperclass(cls); id (*ctor)(id, SEL); id (*last)(id, SEL); if (super != nil) if (!call_ctors(super, obj)) return false; if (cxx_construct == NULL) cxx_construct = sel_registerName(".cxx_construct"); if (!class_respondsToSelector(cls, cxx_construct)) return true; ctor = (id(*)(id, SEL)) class_getMethodImplementation(cls, cxx_construct); last = (id(*)(id, SEL)) class_getMethodImplementation(super, cxx_construct); if (ctor == last) return true; return (ctor(obj, cxx_construct) != nil); } id objc_constructInstance(Class cls, void *bytes) { id obj = (id)bytes; |
︙ | ︙ |