diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 02:43:25 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 02:43:25 +0000 |
commit | e983fc72f816b0a770c81bf768b0c75d45feadf9 (patch) | |
tree | 1565198dee2ff7c323dd7ae7d47bcb976d011d43 /libobjc/class.c | |
parent | f9c4db38bb3400de0b809ed37f01b2949ea16558 (diff) | |
download | gcc-e983fc72f816b0a770c81bf768b0c75d45feadf9.tar.gz |
In libobjc/:
2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
* Makefile.in (C_SOURCE_FILES): Added protocols.c.
* objc-private/protocols.h: New.
* protocols.c: New.
* init.c: Include objc-private/protocols.h.
(__objc_exec_class): Call __objc_protocols_init on startup.
(__objc_init_protocols): Call __objc_protocols_add_protocol.
* objc-private/runtime.h: Use (struct objc_method_list *) instead
of MethodList_t, and (struct objc_method *) instead of Method_t.
* objc/deprecated/struct_objc_class.h: Define
__objc_STRUCT_OBJC_CLASS_defined.
* objc-private/module-abi-8.h (struct
objc_method_description_list): New.
(struct objc_class): Only define if
__objc_STRUCT_OBJC_CLASS_defined is undefined.
* objc/runtime.h (class_getName): New.
(objc_getProtocol): New.
(objc_copyProtocolList): New.
(class_addProtocol): New.
(class_conformsToProtocol): New.
(class_copyProtocolList): New.
(protocol_conformsToProtocol): New.
(protocol_isEqual): New.
(protocol_getName): New.
(protocol_getMethodDescription): New.
(protocol_copyMethodDescriptionList): New.
(protocol_getProperty): New.
(protocol_copyPropertyList): New.
(protocol_copyProtocolList): New.
* class.c (class_getName): New.
* selector.c (sel_isEqual): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/class.c')
-rw-r--r-- | libobjc/class.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libobjc/class.c b/libobjc/class.c index 216d6ace0dc..727b26f4b97 100644 --- a/libobjc/class.c +++ b/libobjc/class.c @@ -139,7 +139,8 @@ static class_node_ptr class_table_array[CLASS_TABLE_SIZE]; /* The table writing mutex - we lock on writing to avoid conflicts between different writers, but we read without locks. That is possible because we assume pointer assignment to be an atomic - operation. */ + operation. TODO: This is only true under certain circumstances, + which should be clarified. */ static objc_mutex_t __class_table_lock = NULL; /* CLASS_TABLE_HASH is how we compute the hash of a class name. It is @@ -730,7 +731,14 @@ __objc_resolve_class_links (void) objc_mutex_unlock (__objc_runtime_mutex); } +const char * +class_getName (Class class_) +{ + if (class_ == Nil) + return "nil"; + return class_->name; +} #define CLASSOF(c) ((c)->class_pointer) |