mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
reinstate deleted code (bug #42405)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37904 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2a7fa54019
commit
43f07926da
5 changed files with 122 additions and 12 deletions
|
@ -186,6 +186,22 @@ static Class NSInvocation_concrete_class;
|
|||
|
||||
|
||||
|
||||
GS_ROOT_CLASS
|
||||
@interface GSInvocationProxy
|
||||
{
|
||||
@public
|
||||
Class isa;
|
||||
id target;
|
||||
NSInvocation *invocation;
|
||||
}
|
||||
+ (id) _newWithTarget: (id)t;
|
||||
- (NSInvocation*) _invocation;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector;
|
||||
@end
|
||||
@interface GSMessageProxy : GSInvocationProxy
|
||||
@end
|
||||
|
||||
#define _inf ((NSArgumentInfo*)_info)
|
||||
|
||||
/**
|
||||
|
@ -804,6 +820,23 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
return nil;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal use.
|
||||
*/
|
||||
+ (id) _newProxyForInvocation: (id)target
|
||||
{
|
||||
return (id)[GSInvocationProxy _newWithTarget: target];
|
||||
}
|
||||
+ (id) _newProxyForMessage: (id)target
|
||||
{
|
||||
return (id)[GSMessageProxy _newWithTarget: target];
|
||||
}
|
||||
+ (NSInvocation*) _returnInvocationAndDestroyProxy: (id)proxy
|
||||
{
|
||||
NSInvocation *inv = [proxy _invocation];
|
||||
NSDeallocateObject(proxy);
|
||||
return inv;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSInvocation (BackwardCompatibility)
|
||||
|
@ -819,7 +852,6 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
#warning Using dummy NSInvocation implementation. It is strongly recommended that you use libffi.
|
||||
@implementation GSDummyInvocation
|
||||
|
||||
|
||||
/*
|
||||
* This is the de_signated initialiser.
|
||||
*/
|
||||
|
@ -845,3 +877,33 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
@end
|
||||
#endif
|
||||
|
||||
@implementation GSInvocationProxy
|
||||
+ (id) _newWithTarget: (id)t
|
||||
{
|
||||
GSInvocationProxy *o;
|
||||
o = (GSInvocationProxy*) NSAllocateObject(self, 0, NSDefaultMallocZone());
|
||||
o->target = RETAIN(t);
|
||||
return o;
|
||||
}
|
||||
- (NSInvocation*) _invocation
|
||||
{
|
||||
return invocation;
|
||||
}
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation
|
||||
{
|
||||
invocation = anInvocation;
|
||||
}
|
||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
|
||||
{
|
||||
return [target methodSignatureForSelector: aSelector];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GSMessageProxy
|
||||
- (NSInvocation*) _invocation
|
||||
{
|
||||
[invocation setTarget: target];
|
||||
return invocation;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue