Re: 64-bit iOS
Re: 64-bit iOS
- Subject: Re: 64-bit iOS
- From: Marcel Weiher <email@hidden>
- Date: Sun, 15 Sep 2013 22:02:47 +0200
On Sep 14, 2013, at 16:58 , David Duncan <email@hidden> wrote:
> On Sep 14, 2013, at 7:37 AM, vipgs99 <email@hidden> wrote:
>> So do I need replace all int to NSInteger?
>
> Technically no, but generally you do need to evaluate every usage of data types of a specific width and ensure that in 64-bit mode you won’t exceed the bounds of what an int can store.
I’d say use long or NSInteger in APIs, but in storage store only what you actually need. The transition guide actually has one of the examples I ferreted out: using 64 bit integers for every part of a struct representing date components. So 64 bit year, 64 bit month (range 1-12), 64 bit day (range 1-31), 64 bit hour, 64 bit minute, 64 bit second.
64 bit doubles per color component may also be overkill, by about a factor of six.
> It is more common to err on the safe side instead and simply use NSInteger instead however.
Alas, this is true.
Marcel
_______________________________________________
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