mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 01:21:08 +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
fca11c379c
commit
ab0d3d493b
1 changed files with 28 additions and 17 deletions
|
@ -302,9 +302,13 @@ format: @"NSDistantObject objects only encode with PortEncoder class"];
|
||||||
|
|
||||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
||||||
{
|
{
|
||||||
|
if (_isLocal) {
|
||||||
|
return [_object methodSignatureForSelector: aSelector];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (_protocol) {
|
||||||
const char *types = 0;
|
const char *types = 0;
|
||||||
|
|
||||||
if (_protocol) {
|
|
||||||
struct objc_method_description* mth;
|
struct objc_method_description* mth;
|
||||||
|
|
||||||
mth = [_protocol descriptionForInstanceMethod: aSelector];
|
mth = [_protocol descriptionForInstanceMethod: aSelector];
|
||||||
|
@ -314,14 +318,21 @@ format: @"NSDistantObject objects only encode with PortEncoder class"];
|
||||||
if (mth != 0) {
|
if (mth != 0) {
|
||||||
types = mth->types;
|
types = mth->types;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
|
||||||
types = [self selectorTypeForProxy: aSelector];
|
|
||||||
}
|
|
||||||
if (types == 0) {
|
if (types == 0) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
return [NSMethodSignature signatureWithObjCTypes: types];
|
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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setProtocolForProxy: (Protocol*)aProtocol
|
- (void) setProtocolForProxy: (Protocol*)aProtocol
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue