Re: Carbon Boolean
Re: Carbon Boolean
- Subject: Re: Carbon Boolean
- From: Graham Cox <email@hidden>
- Date: Fri, 12 Jun 2009 02:26:00 +1000
On 12/06/2009, at 2:12 AM, Matt Neuburg wrote:
What is a (Carbon) Boolean and how do I convert it to a Cocoa BOOL
(regardless of architecture)? Thx - m.
A Boolean is an unsigned char and a BOOL is a signed char. Since both
define false as 0 and true as !0, you can simply cast one to the
other. The ISA doesn't make any difference because it's a single byte.
--Graham
_______________________________________________
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