mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-05 22:20:59 +00:00
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
This commit is contained in:
parent
a810882f43
commit
f10a31e6f3
1 changed files with 1 additions and 9 deletions
|
@ -103,8 +103,6 @@ static Method
|
||||||
class_getInstanceMethodNonrecursive(Class aClass, SEL aSelector)
|
class_getInstanceMethodNonrecursive(Class aClass, SEL aSelector)
|
||||||
{
|
{
|
||||||
struct objc_method_list *methods;
|
struct objc_method_list *methods;
|
||||||
const char *name = sel_get_name(aSelector);
|
|
||||||
const char *types = sel_get_type(aSelector);
|
|
||||||
|
|
||||||
for (methods = aClass->methods;
|
for (methods = aClass->methods;
|
||||||
methods != NULL; methods = methods->method_next)
|
methods != NULL; methods = methods->method_next)
|
||||||
|
@ -115,16 +113,10 @@ class_getInstanceMethodNonrecursive(Class aClass, SEL aSelector)
|
||||||
{
|
{
|
||||||
Method_t method = &methods->method_list[i];
|
Method_t method = &methods->method_list[i];
|
||||||
|
|
||||||
if (strcmp(sel_get_name(method->method_name), name) == 0)
|
if (method->method_name->sel_id == aSelector->sel_id)
|
||||||
{
|
|
||||||
if (NULL == types || strcmp(types, method->method_types) == 0)
|
|
||||||
{
|
{
|
||||||
return method;
|
return method;
|
||||||
}
|
}
|
||||||
// Return NULL if the method exists with this name but has the
|
|
||||||
// wrong types
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue