Get -methodSignatureForSelector: right again in case the method is

called on a class object and the old runtime is used.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32689 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2011-03-22 20:59:06 +00:00
parent 7d51172308
commit 9aafcfb7ad
2 changed files with 19 additions and 6 deletions

View file

@ -1508,8 +1508,15 @@ objc_create_block_classes_as_subclasses_of(Class super);
struct objc_slot *slot = objc_get_slot(object_getClass(self), aSelector);
types = slot->types;
#else
struct objc_method *mth =
GSGetMethod(c, aSelector, GSObjCIsInstance(self), YES);
struct objc_method *mth;
if (GSObjCIsInstance(self))
{
mth = GSGetMethod(object_getClass(self), aSelector, YES, YES);
}
else
{
mth = GSGetMethod((Class)self, aSelector, NO, YES);
}
types = method_getTypeEncoding (mth);
#endif
}