Re: Weird inline/struct offset problem
Re: Weird inline/struct offset problem
- Subject: Re: Weird inline/struct offset problem
- From: Philippe Casgrain <email@hidden>
- Date: Thu, 17 Aug 2006 09:15:07 -0400
Eric Albert a écrit :
While I don't have a solution for the problems you've described, I do
have a few comments....
On Aug 16, 2006, at 12:09 PM, Allen Cronce wrote:
We've got a cross platform, legacy C++ static library that uses a 'BOOL'
type. For Windows, this is a standard type defined as an int. For Mac,
we define it as a 'bool'.
'BOOL' unfortunately is not the same as 'bool' on the Mac. On
PowerPC, 'bool' is four bytes, but BOOL is an unsigned char. On
Intel, 'bool' is one byte, but I can't remember if it's signed or
unsigned.
For this very reason (our app is large, legacy, cross-platform) we ended
up with a "typedef unsigned char Boolean", and every time we write
something to disk, we use the Boolean type rather than bool or BOOL. It
really helps with byte-swapping, too!
Philippe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden