ObjFW  Check-in [9514bfbc12]

Overview
Comment:Add object_{set,get}Class(Name).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9514bfbc12ace04c32b75940b45efb6e175db722fe2eda2afc4c58c9425f0134
User & Date: js on 2012-07-12 01:11:26
Other Links: manifest | tags
Context
2012-07-12
01:28
Don't access isa directly. check-in: 8892ae9fcc user: js tags: trunk
01:11
Add object_{set,get}Class(Name). check-in: 9514bfbc12 user: js tags: trunk
01:11
configure.ac: Prefer clang over gcc. check-in: 9b07981282 user: js tags: trunk
Changes

Modified src/runtime/runtime.h from [37bafc00ae] to [ce76e78d32].

128
129
130
131
132
133
134
135






















136
extern BOOL protocol_isEqual(Protocol*, Protocol*);
extern BOOL protocol_conformsToProtocol(Protocol*, Protocol*);
extern void objc_thread_add(void);
extern void objc_thread_remove(void);
extern void objc_exit(void);
extern objc_uncaught_exception_handler objc_setUncaughtExceptionHandler(
    objc_uncaught_exception_handler);























#endif








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
extern BOOL protocol_isEqual(Protocol*, Protocol*);
extern BOOL protocol_conformsToProtocol(Protocol*, Protocol*);
extern void objc_thread_add(void);
extern void objc_thread_remove(void);
extern void objc_exit(void);
extern objc_uncaught_exception_handler objc_setUncaughtExceptionHandler(
    objc_uncaught_exception_handler);

static inline Class
object_getClass(id obj_)
{
	struct objc_object *obj = (struct objc_object*)obj_;

	return obj->isa;
}

static inline void
object_setClass(id obj_, Class cls)
{
	struct objc_object *obj = (struct objc_object*)obj_;

	obj->isa = cls;
}

static inline const char*
object_getClassName(id obj)
{
	return class_getName(object_getClass(obj));
}

#endif