Re: Passing C Style Function Callbacks in Cocoa
Re: Passing C Style Function Callbacks in Cocoa
- Subject: Re: Passing C Style Function Callbacks in Cocoa
- From: Dustin Voss <email@hidden>
- Date: Fri, 5 Mar 2004 14:13:56 -0800
On 5 Mar, 2004, at 1:35 PM, Clark Cox wrote:
On Mar 05, 2004, at 15:26, Ondra Cada wrote:
Clark,
On Friday, Mar 5, 2004, at 20:30 Europe/Prague, Clark Cox wrote:
(who says that pointers and BOOLs are returned in the same
register?).
Why, the documentation, of course: I think you want to check the
"Function Return" paragraph of
/Developer/Documentation/DeveloperTools/MachORuntime/2rt_powerpc_abi/
PowerPC_Cal_Conventions.html.
I know that they are in this case, but that might not always be so.
That was made clear from the sentence that you snipped: "You have no
guarantee that that will continue to work in the future".
The objc_msgSend function seems to return ints, BOOLs, etc. as an id. I
must confess I don't know how that works to return floating-point
values or long longs, since they don't fit into an id-sized register.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.