ObjFW  Check-in [52ddac07da]

Overview
Comment:Let object_setClass() return the old class.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 52ddac07da1d8bf1a0c50467eb285e52d0877ce44522b9cf2122b4c9495cbf27
User & Date: js on 2012-07-12 02:04:36
Other Links: manifest | tags
Context
2012-07-12
02:34
PLATFORMS.md: Fix spacing. check-in: 60111e5ab7 user: js tags: trunk
02:04
Let object_setClass() return the old class. check-in: 52ddac07da user: js tags: trunk
01:28
Don't access isa directly. check-in: 8892ae9fcc user: js tags: trunk
Changes

Modified src/runtime/runtime.h from [ce76e78d32] to [dd41eb5b33].

137
138
139
140
141
142
143
144

145
146
147

148
149


150
151
152
153
154
155
156
157
158
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161







-
+



+


+
+









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

	return obj->isa;
}

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

	obj->isa = cls;

	return old;
}

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

#endif