mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Method signature fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/freeze-1_0_0@9481 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f79f14240d
commit
d544c693b9
2 changed files with 22 additions and 2 deletions
|
@ -36,8 +36,13 @@
|
|||
|
||||
+ (NSMethodSignature*) signatureWithObjCTypes: (const char*)t
|
||||
{
|
||||
NSMethodSignature *newMs = [[NSMethodSignature alloc] autorelease];
|
||||
NSMethodSignature *newMs;
|
||||
|
||||
if (t == 0 || *t == '\0')
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
newMs = AUTORELEASE([NSMethodSignature alloc]);
|
||||
newMs->_methodTypes = mframe_build_signature(t, &newMs->_argFrameLength,
|
||||
&newMs->_numArgs, 0);
|
||||
|
||||
|
|
|
@ -756,14 +756,29 @@ static BOOL deallocNotifications = NO;
|
|||
const char *types;
|
||||
struct objc_method *mth;
|
||||
|
||||
if (aSelector == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
mth = (GSObjCIsInstance(self)
|
||||
? class_get_instance_method(GSObjCClass(self), aSelector)
|
||||
: class_get_class_method(GSObjCClass(self), aSelector));
|
||||
if (mth == 0)
|
||||
{
|
||||
types = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
types = mth->method_types;
|
||||
}
|
||||
if (types == 0)
|
||||
{
|
||||
types = aSelector->sel_types;
|
||||
}
|
||||
if (types == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
types = mth->method_types;
|
||||
return [NSMethodSignature signatureWithObjCTypes: types];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue