Improve reliability of methodSignatureForSelector.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9310 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2001-03-07 21:21:10 +00:00
parent aab21f70fc
commit 097642b0d7
3 changed files with 18 additions and 17 deletions

View file

@ -1,3 +1,8 @@
2001-03-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: ([methodSignatureForSelector:]) reliability
fix suggested by Manuel Guesdon <ml@sbuilders.com>
2001-03-06 Adam Fedor <fedor@gnu.org> 2001-03-06 Adam Fedor <fedor@gnu.org>
* Source/libgnustep-base.def: Regenerate. * Source/libgnustep-base.def: Regenerate.

View file

@ -113,6 +113,9 @@
<sel>instanceMethodSignatureForSelector:</sel> <sel>instanceMethodSignatureForSelector:</sel>
<arg type="SEL">aSelector</arg> <arg type="SEL">aSelector</arg>
<desc> <desc>
Returns a method signature object representing the
method implemented for instsances of this class which
corresponds to the supplied selector.
</desc> </desc>
</method> </method>
<method type="BOOL" factory="yes"> <method type="BOOL" factory="yes">
@ -293,6 +296,9 @@
<sel>methodSignatureForSelector:</sel> <sel>methodSignatureForSelector:</sel>
<arg type="SEL">aSelector</arg> <arg type="SEL">aSelector</arg>
<desc> <desc>
Returns a method signature object representing the
method implemented in this object which corresponds to
the supplied selector.
</desc> </desc>
</method> </method>
<method type="id"> <method type="id">

View file

@ -754,15 +754,6 @@ static BOOL deallocNotifications = NO;
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector - (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
{ {
const char *types; const char *types;
#ifdef __FreeBSD__
types = NULL;
#else
types = aSelector->sel_types;
#endif
if (types == 0)
{
struct objc_method *mth; struct objc_method *mth;
mth = (GSObjCIsInstance(self) mth = (GSObjCIsInstance(self)
@ -773,7 +764,6 @@ static BOOL deallocNotifications = NO;
return nil; return nil;
} }
types = mth->method_types; types = mth->method_types;
}
return [NSMethodSignature signatureWithObjCTypes: types]; return [NSMethodSignature signatureWithObjCTypes: types];
} }