summaryrefslogtreecommitdiff
path: root/libobjc/objc/objc.h
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-11 02:36:32 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-10-11 02:36:32 +0000
commitfdcbbfe70c66b9c793f7e0cde99e1acdbc299990 (patch)
treef2b370a071fcf2d2a1803013ffb11cafc329f866 /libobjc/objc/objc.h
parentf3660703cb78861bb89b261524a71f8c04d61e95 (diff)
downloadgcc-fdcbbfe70c66b9c793f7e0cde99e1acdbc299990.tar.gz
In libobjc/: 2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com> * Makefile.in (C_SOURCE_FILES): Added ivars.c. * ivars.c: New. * objc/objc.h: Updated comments. * objc/runtime.h (object_getClass): New. (object_getClassName): New. (object_setClass): New. (class_getInstanceVariable): New. (object_getIndexedIvars): New. (object_getInstanceVariable): New. (object_setInstanceVariable): New. (object_getIvar): New. (object_setIvar): New. (ivar_getName): New. (ivar_getOffset): New. (ivar_getTypeEncoding): New. * objc-private/module-abi-8.h (struct objc_class): Added. * objects.c (object_getClassName): New. (object_setClass): New. From-SVN: r165269
Diffstat (limited to 'libobjc/objc/objc.h')
-rw-r--r--libobjc/objc/objc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libobjc/objc/objc.h b/libobjc/objc/objc.h
index 76812ad5f79..7d382169dfb 100644
--- a/libobjc/objc/objc.h
+++ b/libobjc/objc/objc.h
@@ -91,9 +91,7 @@ typedef struct objc_class *Class;
/* An 'id' is an object of an unknown class. The way the object data
is stored inside the object is private and what you see here is
only the beginning of the actual struct. The first field is always
- a pointer to the Class that the object belongs to. If performance
- is paramount, you can use this knowledge to get the class of an
- object by doing '((id)object)->class_pointer'.
+ a pointer to the Class that the object belongs to.
*/
typedef struct objc_object
{
@@ -101,7 +99,9 @@ typedef struct objc_object
of a Class object, this pointer points to the meta class.
Compatibility Note: The Apple/NeXT runtime calls this field
- 'isa'. */
+ 'isa'. To access this field in a portable way, use
+ object_getClass() from runtime.h, which is an inline function so
+ does not add any overhead. */
Class class_pointer;
} *id;