From f7185d479171342a33ffc2bc76226e86d400a785 Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Fri, 15 Oct 2010 10:35:00 +0000 Subject: In libobjc/: 2010-10-14 Nicola Pero In libobjc/: 2010-10-14 Nicola Pero * 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. From-SVN: r165499 --- libobjc/protocols.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libobjc/protocols.c') diff --git a/libobjc/protocols.c b/libobjc/protocols.c index bc714ae63ae..d23d42d8f82 100644 --- a/libobjc/protocols.c +++ b/libobjc/protocols.c @@ -383,7 +383,7 @@ struct objc_method_description protocol_getMethodDescription (Protocol *protocol { for (i = 0; i < methods->count; i++) { - if (strcmp ((char*)(methods->list[i].name), selector_name) == 0) + if (strcmp (sel_getName (methods->list[i].name), selector_name) == 0) return methods->list[i]; } } -- cgit v1.2.1