Re: Which flavor of objc_msgSend for NSSize return
Re: Which flavor of objc_msgSend for NSSize return
- Subject: Re: Which flavor of objc_msgSend for NSSize return
- From: Sherm Pendley <email@hidden>
- Date: Fri, 11 May 2007 23:30:58 -0400
On May 11, 2007, at 10:36 PM, Greg Parker wrote:
Sherm Pendley wrote:
The runtime reference simply says to call _stret for all structure
return types - it doesn't distinguish between struct sizes. I
followed that rule for CamelBones, and it passes all its self-tests
on i386, as well as running every app I've tried without fail.
This is incorrect. Using objc_msgSend when you should use
objc_msgSend_stret, or vice versa, will crash in the messenger or
pass incorrect values to the called method or return incorrect
values to the caller.
Okay, apologies to all - especially Rosyna - for the noise. Clearly
I've been doing this the wrong way in CamelBones. (Which leads me to
wonder why no one has reported crashes or bizarre return values on
Intel... and for that matter why the self-tests passed on Intel when
I ran them. But that's a question for another day.)
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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