Minor fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17111 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-07-04 17:34:48 +00:00
parent c1d2603060
commit cdf431407a
2 changed files with 8 additions and 5 deletions

View file

@ -3,6 +3,8 @@
* Source/NSDistributedNotificationCenter.m: Use -setProtocolForProxy:
and implement dummy class to work around bug in old compilers.
* Tools/gdnc.m: ditto
* Source/NSDistantObject.m: Fix for calls to remote system where we
can get no method signature.
2003-07-04 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -35,14 +35,15 @@
#include "Foundation/NSObjCRuntime.h"
#include "Foundation/NSInvocation.h"
#define DO_FORWARD_INVOCATION(_SELX, _ARG1) \
#define DO_FORWARD_INVOCATION(_SELX, _ARG1) ({ \
sig = [self methodSignatureForSelector: @selector(_SELX)]; \
if (sig != nil) { \
inv = [NSInvocation invocationWithMethodSignature: sig]; \
[inv setSelector: @selector(_SELX)]; \
[inv setTarget: self]; \
[inv setArgument: (void*)&_ARG1 atIndex: 2]; \
[self forwardInvocation: inv]; \
[inv getReturnValue: &m]
[inv getReturnValue: &m]; }})
static int debug_proxy = 0;
@ -842,7 +843,7 @@ enum
}
else
{
id m;
id m = nil;
#ifdef USE_FFCALL
id inv;
id sig;
@ -992,7 +993,7 @@ static inline BOOL class_is_kind_of (Class self, Class aClassObject)
- (BOOL) conformsToProtocol: (Protocol*)aProtocol
{
#ifdef USE_FFCALL
BOOL m;
BOOL m = NO;
id inv, sig;
DO_FORWARD_INVOCATION(conformsToProtocol:, aProtocol);
return m;
@ -1017,7 +1018,7 @@ static inline BOOL class_is_kind_of (Class self, Class aClassObject)
- (BOOL) respondsToSelector: (SEL)aSelector
{
#ifdef USE_FFCALL
BOOL m;
BOOL m = NO;
id inv, sig;
DO_FORWARD_INVOCATION(respondsToSelector:, aSelector);
return m;