143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char);
#define OF_IVAR_OFFSET(ivar) ((intptr_t)&ivar - (intptr_t)self)
#define OF_GETTER(ivar, atomic) \
return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic);
#define OF_SETTER(ivar, value, atomic, copy) \
objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy);
#define OF_UNRECOGNIZED_SELECTOR \
[self doesNotRecognizeSelector: _cmd]; \
abort();
#define OF_INVALID_INIT_METHOD \
@try { \
[self doesNotRecognizeSelector: _cmd]; \
} @catch (id e) { \
[self release]; \
@throw e; \
} \
|
>
>
>
>
>
>
<
>
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char);
#define OF_IVAR_OFFSET(ivar) ((intptr_t)&ivar - (intptr_t)self)
#define OF_GETTER(ivar, atomic) \
return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic);
#define OF_SETTER(ivar, value, atomic, copy) \
objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy);
#if defined(__clang__) || __GCC_VERSION__ >= 405
# define OF_UNREACHABLE __builtin_unreachable();
#else
# define OF_UNREACHABLE abort();
#endif
#define OF_UNRECOGNIZED_SELECTOR \
[self doesNotRecognizeSelector: _cmd]; \
OF_UNREACHABLE
#define OF_INVALID_INIT_METHOD \
@try { \
[self doesNotRecognizeSelector: _cmd]; \
} @catch (id e) { \
[self release]; \
@throw e; \
} \
|