GC fix for proxy finalisation error.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32764 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-04-03 04:25:52 +00:00
parent a224756aea
commit 23fc4889d1
2 changed files with 9 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2011-04-03 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: Fix problem with finalization of proxies and
remove obsolete runtime call to see if a class respons to selector.
2011-03-31 Riccardo Mottola <rm@gnu.org> 2011-03-31 Riccardo Mottola <rm@gnu.org>
* Source/ObjectiveC2/Makefile.preamble * Source/ObjectiveC2/Makefile.preamble

View file

@ -65,10 +65,6 @@
#import "GSPrivate.h" #import "GSPrivate.h"
#ifndef NeXT_RUNTIME
extern BOOL __objc_responds_to(id, SEL);
#endif
/* When this is `YES', every call to release/autorelease, checks to /* When this is `YES', every call to release/autorelease, checks to
make sure isn't being set up to release itself too many times. make sure isn't being set up to release itself too many times.
This does not need mutex protection. */ This does not need mutex protection. */
@ -582,7 +578,8 @@ GSFinalize(void* object, void* data)
static BOOL static BOOL
GSIsFinalizable(Class c) GSIsFinalizable(Class c)
{ {
if (class_getMethodImplementation(c, finalize_sel) != finalize_imp) if (class_getMethodImplementation(c, finalize_sel) != finalize_imp
&& class_respondsToSelector(c, finalize_sel))
return YES; return YES;
return NO; return NO;
} }
@ -1341,7 +1338,7 @@ objc_create_block_classes_as_subclasses_of(Class super);
} }
return NO; return NO;
} }
return __objc_responds_to((id)&self, aSelector); return class_respondsToSelector(self, aSelector) ? YES : NO;
} }
/** /**
@ -1914,7 +1911,7 @@ objc_create_block_classes_as_subclasses_of(Class super);
return NO; return NO;
} }
return __objc_responds_to(self, aSelector); return class_respondsToSelector(object_getClass(self), aSelector) ? YES : NO;
} }
/** /**