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:
Richard Frith-MacDonald 1998-09-29 11:32:53 +00:00
parent 5380811bdc
commit 274bcbcab5

View file

@ -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