From fdcbbfe70c66b9c793f7e0cde99e1acdbc299990 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Mon, 11 Oct 2010 02:36:32 +0000 Subject: In libobjc/: 2010-10-11 Nicola Pero In libobjc/: 2010-10-11 Nicola Pero * 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 --- libobjc/objc/objc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libobjc/objc/objc.h') diff --git a/libobjc/objc/objc.h b/libobjc/objc/objc.h index 76812ad..7d38216 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; -- cgit v1.1