From a0a018b4c509e2cfccd97aac2da19e01b0909dcd Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sat, 27 Feb 2010 06:33:39 +0000 Subject: [PATCH] remove bogus consistency check git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29784 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Source/NSObject.m | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81c5835d8..72ee8c6d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-02-27 Richard Frith-Macdonald + + * Source/NSObject.m: ([methodSignatureForSelector:]) remote the check + (and exception) to see if the sel types are the same as the signature + types, since this method is used precisesly when we think we may have + a selector with the wrong type information (eg we are using KVC and + generated the selector name to access an ivar and the runtime gave us + a selector with the type infor for accessing an ivar of another class). + Should fix bug #29015 + 2010-02-26 Richard Frith-Macdonald * Source/NSBundle.m: Apply suggested fix for bug #29012 diff --git a/Source/NSObject.m b/Source/NSObject.m index b26579020..5da0e7a7e 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -1450,7 +1450,6 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak)); */ - (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector { - const char *selTypes; const char *types; struct objc_method *mth; Class c; @@ -1459,7 +1458,6 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak)); [NSException raise: NSInvalidArgumentException format: @"%@ null selector given", NSStringFromSelector(_cmd)]; - selTypes = sel_get_type(aSelector); c = (GSObjCIsInstance(self) ? object_getClass(self) : (Class)self); mth = GSGetMethod(c, aSelector, GSObjCIsInstance(self), YES); @@ -1516,13 +1514,6 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak)); { return nil; } - else if (selTypes != 0 && GSSelectorTypesMatch(selTypes, types) == NO) - { - [NSException raise: NSInternalInconsistencyException - format: @"[%@%c%@] selector types (%s) don't match method types (%s)", - NSStringFromClass(c), (GSObjCIsInstance(self) ? '-' : '+'), - NSStringFromSelector(aSelector), selTypes, types]; - } return [NSMethodSignature signatureWithObjCTypes: types]; }