discuss-gnustep
[Top][All Lists]
Advanced

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

Re: What does "va_start and va_return type disagree" mean?


From: Richard Frith-Macdonald
Subject: Re: What does "va_start and va_return type disagree" mean?
Date: Tue, 6 Apr 2004 21:26:04 +0100


On 6 Apr 2004, at 20:45, Philip Mötteli wrote:

I know it sounds unlikely, but I'd have though that this meant that the method in the remote process has a different return type to the method in the local process.

If the method is not declared in the local process, the compiler will have built the software to expect it to have a return type of 'id', so when it tires to return a 'BOOL' it can't. The simple solution is to have a protocol declaring the method which is visible when the local process is compiled, so that the compiler knows to build the code to expect a BOOL return.

Thanks, that was the solution!
But what, if I don't always want or can define a protocol for everything, that doesn't return an 'id'?

I'm afraid you shouldn't be calling the methods if you don't know what they are going to return.

You can always use -methodSignatureForSelector: to find out what a method returns, then call it the
appropriate way.





reply via email to

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