On 26 Dec 2014, at 12:47, Richard Frith-Macdonald <[email protected]> wrote:
> I wonder if this is an issue with invocations that we could fix some way? > Anyway, I tried changing that method from -(NSRect)winRect to > -(void)getWinRect:(NSRect*)rptr./t I think that one of the NSInvocation sublcass implementations we had had a method called -_copyReturnValue or similar that would allocate some space in the invocation object for the return value and rewrite the pointer argument. This is relatively easy to do when you know the size of the return (which the FFI layer needs to anyway) and the calling convention, but as I recall libFFI doesn't support this. It's also somewhat difficult to make NSInvocation semantics behave correctly if this is done, because the original caller expects the value to be in that location on the stack, so you'll want to fill in something there first. OS X doesn't make any attempt to do this, as I discovered from the stack corruption that I got when I tried to make EtoileThread work there. David -- Sent from my IBM 1620 _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
