summaryrefslogtreecommitdiff
path: root/libobjc/selector.c
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-12 02:43:25 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-12 02:43:25 +0000
commite983fc72f816b0a770c81bf768b0c75d45feadf9 (patch)
tree1565198dee2ff7c323dd7ae7d47bcb976d011d43 /libobjc/selector.c
parentf9c4db38bb3400de0b809ed37f01b2949ea16558 (diff)
downloadgcc-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/selector.c')
-rw-r--r--libobjc/selector.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libobjc/selector.c b/libobjc/selector.c
index e51dd20bd9b..0c12130ae38 100644
--- a/libobjc/selector.c
+++ b/libobjc/selector.c
@@ -163,6 +163,14 @@ void __objc_register_instance_methods_to_class (Class class)
__objc_update_dispatch_table_for_class (class->class_pointer);
}
+BOOL
+sel_isEqual (SEL s1, SEL s2)
+{
+ if (s1 == 0 || s2 == 0)
+ return s1 == s2;
+ else
+ return s1->sel_id == s2->sel_id;
+}
/* Returns YES iff t1 and t2 have same method types, but we ignore
the argframe layout */