And here you made an mistake: LP64 means long is already 64 bits. On 32-bit, 
sizeof(int) = sizeof(long) = sizeof(void *) = 4, sizeof(long long) = 8; and on 
64-bit sizeof(int) = 4 and sizeof(long) = sizeof(long long) = sizeof(void *) = 
8. You can check this through various configure scripts.

Sent from my iPhone

On 2013年12月2日, at 18:27, Kyle Sluder <k...@ksluder.com> wrote:

>> On Dec 2, 2013, at 1:54 AM, ChanMaxthon <xcvi...@me.com> wrote:
>> 
>> You can check what type int32_t (or uint32_t) is typedef'd to and use that 
>> corresponding type on your intended platform. Sort of like:
>> 
>> - (int32_t) int32Value
>> {
>>   if (!strcmp(@encode(int32_t), @encode(int))
>>       return [self intValue];
>>   else if (!strcmp(@encode(int32_t), @encode(long))
>>       return [self longValue];
>>   else
>>       return 0;
>> }
> 
> This code is useless on iOS and OS X, as they are LP64 platforms. `int` and 
> `long` are always 32 bits.
> 
> --Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to