mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Tidied method signature stuff.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2988 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5380811bdc
commit
274bcbcab5
1 changed files with 28 additions and 17 deletions
|
@ -302,26 +302,37 @@ format: @"NSDistantObject objects only encode with PortEncoder class"];
|
|||
|
||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
||||
{
|
||||
const char *types = 0;
|
||||
|
||||
if (_protocol) {
|
||||
struct objc_method_description* mth;
|
||||
|
||||
mth = [_protocol descriptionForInstanceMethod: aSelector];
|
||||
if (mth == 0) {
|
||||
mth = [_protocol descriptionForClassMethod: aSelector];
|
||||
}
|
||||
if (mth != 0) {
|
||||
types = mth->types;
|
||||
}
|
||||
if (_isLocal) {
|
||||
return [_object methodSignatureForSelector: aSelector];
|
||||
}
|
||||
else {
|
||||
types = [self selectorTypeForProxy: aSelector];
|
||||
if (_protocol) {
|
||||
const char *types = 0;
|
||||
|
||||
struct objc_method_description* mth;
|
||||
|
||||
mth = [_protocol descriptionForInstanceMethod: aSelector];
|
||||
if (mth == 0) {
|
||||
mth = [_protocol descriptionForClassMethod: aSelector];
|
||||
}
|
||||
if (mth != 0) {
|
||||
types = mth->types;
|
||||
}
|
||||
if (types == 0) {
|
||||
return nil;
|
||||
}
|
||||
return [NSMethodSignature signatureWithObjCTypes: types];
|
||||
}
|
||||
else {
|
||||
arglist_t args;
|
||||
|
||||
/*
|
||||
* No protocol - so try forwarding the message.
|
||||
*/
|
||||
args = __builtin_apply_args();
|
||||
__builtin_return([self forward: _cmd : args]);
|
||||
}
|
||||
}
|
||||
if (types == 0) {
|
||||
return nil;
|
||||
}
|
||||
return [NSMethodSignature signatureWithObjCTypes: types];
|
||||
}
|
||||
|
||||
- (void) setProtocolForProxy: (Protocol*)aProtocol
|
||||
|
|
Loading…
Reference in a new issue