help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSInvocation does not seem to always assign return value


From: Sebastien Pierre
Subject: NSInvocation does not seem to always assign return value
Date: Tue, 22 Apr 2003 17:16:14 +0200

Hi all,

I am trying to port a scripting language named Io Objective-C bridge from Cocoa 
to GNUstep. I have experienced some issues in this process, and most notably 
when using NSInvocation objects.

Here is the code snippet that executes an NSInvocation object (the 
Io2Objc_perform function, which translates a Io message to an Objc message) and 
gets the result:

<snip>
  if (*cType == '@')
  {
    id obj;
    [invocation getReturnValue:&obj];
        //assert(obj!=nil);
    [pool release];
    return IoObjcBridge_ioValueForCValue_ofType_(self->bridge, obj, cType);
  }
  else
  {
    [invocation getReturnValue:&(self->returnBuffer)];
        //assert(self->returnBuffer!=NULL);
    [pool release];
    return IoObjcBridge_ioValueForCValue_ofType_(self->bridge, 
self->returnBuffer, cType);
  }
</snip>

When the "assert" are commented, as shown in the example, Io does not get the 
return value:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]