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

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