From f10a31e6f396be131d618affd921872425d1cd20 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Mon, 17 May 2010 13:36:00 +0000 Subject: [PATCH] Back-ported fix in Method lookup from libobjc2 to ObjectiveC2. Should fix the DO-related issues (failure to connect to gdnc and so on). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30409 72102866-910b-0410-8b05-ffd578937521 --- Source/ObjectiveC2/runtime.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/ObjectiveC2/runtime.c b/Source/ObjectiveC2/runtime.c index b0c649f7b..9e958e819 100644 --- a/Source/ObjectiveC2/runtime.c +++ b/Source/ObjectiveC2/runtime.c @@ -103,8 +103,6 @@ static Method class_getInstanceMethodNonrecursive(Class aClass, SEL aSelector) { struct objc_method_list *methods; - const char *name = sel_get_name(aSelector); - const char *types = sel_get_type(aSelector); for (methods = aClass->methods; methods != NULL; methods = methods->method_next) @@ -115,16 +113,10 @@ class_getInstanceMethodNonrecursive(Class aClass, SEL aSelector) { Method_t method = &methods->method_list[i]; - if (strcmp(sel_get_name(method->method_name), name) == 0) - { - if (NULL == types || strcmp(types, method->method_types) == 0) + if (method->method_name->sel_id == aSelector->sel_id) { return method; } - // Return NULL if the method exists with this name but has the - // wrong types - return NULL; - } } } return NULL;