diff options
Diffstat (limited to 'libobjc/objc-private/module-abi-8.h')
-rw-r--r-- | libobjc/objc-private/module-abi-8.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libobjc/objc-private/module-abi-8.h b/libobjc/objc-private/module-abi-8.h index 0c9574bb499..40934521199 100644 --- a/libobjc/objc-private/module-abi-8.h +++ b/libobjc/objc-private/module-abi-8.h @@ -149,34 +149,30 @@ struct objc_method_list structure. */ }; -/* Currently defined in Protocol.m (that definition should go away - once we include this file). Note that a 'struct - objc_method_description' as embedded inside a Protocol uses the - same trick as a 'struct objc_method': the method_name is a 'char *' - according to the compiler, who puts the method name as a string in - there. At runtime, the selectors need to be registered, and the - method_name then becomes a SEL. */ +/* Note that a 'struct objc_method_description' as embedded inside a + Protocol uses the same trick as a 'struct objc_method': the + method_name is a 'char *' according to the compiler, who puts the + method name as a string in there. At runtime, the selectors need + to be registered, and the method_name then becomes a SEL. */ struct objc_method_description_list { int count; struct objc_method_description list[1]; }; -/* Currently defined by objc/objc.h. */ -/* struct objc_protocol { struct objc_class* class_pointer; char *protocol_name; struct objc_protocol_list *protocol_list; struct objc_method_description_list *instance_methods, *class_methods; }; -*/ + struct objc_protocol_list { struct objc_protocol_list *next; size_t count; - Protocol *list[1]; + struct objc_protocol *list[1]; }; /* @@ -189,7 +185,6 @@ struct objc_protocol_list some members change type. The compiler generates "char* const" and places a string in the following member variables: super_class. */ -#ifndef __objc_STRUCT_OBJC_CLASS_defined struct objc_class { struct objc_class* class_pointer; /* Pointer to the class's meta class. */ @@ -232,7 +227,6 @@ struct objc_class { struct objc_protocol_list *protocols; /* Protocols conformed to */ void* gc_object_type; }; -#endif /* __objc_STRUCT_OBJC_CLASS_defined */ /* This is used to assure consistent access to the info field of classes. */ @@ -283,6 +277,11 @@ struct objc_class { (cls)->info >>= (HOST_BITS_PER_LONG/2); \ __CLS_SETINFO(cls, (((unsigned long)num) << (HOST_BITS_PER_LONG/2))); }) +static inline long +class_get_instance_size(Class _class) +{ + return CLS_ISCLASS(_class)?_class->instance_size:0; +} /* The compiler generates one of these structures for each category. A class may have many categories and contain both instance and |