diff --git a/ChangeLog b/ChangeLog index 9afa4be6d..d895666bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ -2011-03-32 Riccardo Mottola +2011-03-22 Wolfgang Lux + + * Source/NSObject.m (-methodSignatureForSelector:): Get method + right again in case the method is called on a class object and the + old runtime is used. + +2011-03-21 Riccardo Mottola * Tests/base/NSNumberFormatter/basic.m: Added new test. - + 2011-03-18 Nicola Pero * Documentation/GNUmakefile (CODING-STANDARDS_TEXI_FILES, @@ -10,12 +16,12 @@ Removed. (DOCUMENT_TEXT_NAME, TOP_DOC_FILES): Fixed names of files to generate; for example, INSTALL instead of install. - + 2011-03-18 Riccardo Mottola * Source/NSSortDescriptor.m: Use Cocoa values for the coding keys. - + 2011-03-18 Richard Frith-Macdonald * Source/Additions/GSObjCRuntime.m: Use old API to work around bug in diff --git a/Source/NSObject.m b/Source/NSObject.m index 6ba28e155..293f3a818 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -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 }