Fix bug were NSObject -methodSignatureForSelector: would return an

incorrect result or even crash when asking a class object for the
signature of one of its class methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31365 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2010-09-17 20:07:50 +00:00
parent c9fb0577bd
commit 861fd81ad2
2 changed files with 7 additions and 1 deletions

View file

@ -1388,7 +1388,7 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
// Do a fast lookup to see if the method is implemented at all. If it isn't,
// we can give up without doing a very expensive linear search through every
// method list in the class hierarchy.
if (!class_respondsToSelector(c, aSelector))
if (!class_respondsToSelector(object_getClass(self), aSelector))
{
return nil; // Method not implemented
}