Re: Returning values from objc_msgSend etc
Re: Returning values from objc_msgSend etc
- Subject: Re: Returning values from objc_msgSend etc
- From: Bill Bumgarner <email@hidden>
- Date: Sat, 1 Mar 2008 09:30:44 -0800
On Mar 1, 2008, at 5:00 AM, Greg Parker wrote:
The right way to fix this is to add new API in libobjc: given an
ffi_type, return the correct objc_msgSend function pointer for that
return type. I filed the feature request for that today. Until then
you'll still need to handle that choice yourself. All of the
required code is in libffi somewhere, but there's no way for you to
call it directly. libffi is open source, so you could try digging
through the implementation and copying the code you want into your
program.
Both PyObjC and RubyCocoa (and F-Script Anywhere, for that matter),
use FFI to call objc_msgSend(). Both have extensive unit tests and,
thus, the logic seems to be correct.
Their licenses are liberal enough that you can lift the logic pretty
much directly and munge for your purposes.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden