summaryrefslogtreecommitdiff
path: root/libobjc/Protocol.m
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-15 10:35:00 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-15 10:35:00 +0000
commit1e13b8762fd121ad1d83c8ceb22b8f9dfb98d18c (patch)
tree25c0b3362de3f254c6fe9987ea63d4a668631f87 /libobjc/Protocol.m
parent0ba90dfe7ae02bd83235d470f23f095c3ef1eab1 (diff)
downloadgcc-1e13b8762fd121ad1d83c8ceb22b8f9dfb98d18c.tar.gz
In libobjc/:
2010-10-14 Nicola Pero <nicola.pero@meta-innovation.com> * init.c (__objc_init_protocol): New function which fixes up a protocol's class pointer, registers it with the runtime, register all protocol selectors and registers associated protocols too. (objc_init_statics): Detect if we are initializing protocols, and if so, use __objc_init_protocol instead of only fixing up the class pointer. (__objc_init_protocls): Use __objc_init_protocol. * objc-private/module-abi-8.h: Updated comments. * objc-private/runtime.h (__objc_register_selectors_from_description_list): New. * selector.c (__objc_register_selectors_from_description_list): New. (struct objc_method_description_list): Declare. * Protocol.m ([-descriptionForInstanceMethod:]): Use sel_get_name when accessing the name of a method, which is now correctly a SEL. ([-descriptionForClassMethod:]): Same change. * protocols.c (protocol_getMethodDescription): Same change. * objc/runtime.h: Updated comments. (sel_registerTypedName): Fixed typo in function name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165499 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/Protocol.m')
-rw-r--r--libobjc/Protocol.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/libobjc/Protocol.m b/libobjc/Protocol.m
index 49b7b3a43d4..e8bb9442ac4 100644
--- a/libobjc/Protocol.m
+++ b/libobjc/Protocol.m
@@ -85,7 +85,7 @@ struct objc_method_description_list {
if (instance_methods)
for (i = 0; i < instance_methods->count; i++)
{
- if (!strcmp ((char*)instance_methods->list[i].name, name))
+ if (!strcmp (sel_get_name (instance_methods->list[i].name), name))
return &(instance_methods->list[i]);
}
@@ -113,7 +113,7 @@ struct objc_method_description_list {
if (class_methods)
for (i = 0; i < class_methods->count; i++)
{
- if (!strcmp ((char*)class_methods->list[i].name, name))
+ if (!strcmp (sel_get_name (class_methods->list[i].name), name))
return &(class_methods->list[i]);
}