Re: Why are BOOL and bool distinct types?
Re: Why are BOOL and bool distinct types?
- Subject: Re: Why are BOOL and bool distinct types?
- From: John Stiles <email@hidden>
- Date: Sun, 12 Jun 2005 20:19:13 -0700
On Jun 8, 2005, at 7:33 AM, Fritz Anderson wrote: On 8 Jun 2005, at 9:08 AM, Sean McBride wrote:
Maybe BOOL should be deprecated now that C99 has a native type?
No. BOOL is 8 bits on all platforms; bool is 32 bits on ppc and 8 bits on i386. Native type != better.
One very important platform (Win32) has a 32-bit type called BOOL. Which means our code needs to do this in its PCH:
#define BOOL BOOL_ObjC #import <Cocoa/Cocoa.h> #undef BOOL
I really hate this hack, but I don't think we have a choice unless we rip BOOL out of the 90% of our codebase which was designed with Win32 in mind. Say what you will, but we work with 10 PC guys and I don't really feel like stepping on all their toes over a goofy Cocoa-ism.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden