Re: Sign extension in NSNumber / 10.4 SDK???
Re: Sign extension in NSNumber / 10.4 SDK???
- Subject: Re: Sign extension in NSNumber / 10.4 SDK???
- From: "Sean McBride" <email@hidden>
- Date: Thu, 17 Jul 2008 14:24:33 -0400
- Organization: Rogue Research
On 7/17/08 9:55 AM, Jens Alfke said:
>> What are my best options to get around that? (Except of using the
>> next larger NSNumber variants to store unsigned values in order to
>> prevent unwanted sign expensions for unsigned values)?
>
>Either require 10.5, or use a larger size. The problem is that
>NSNumber is just a bridge to CFNumber, which didn't support unsigned
>types until 10.5. So on 10.4, the fact that you were storing an
>unsigned 32-bit value got lost when you created the NSNumber.
Interesting. What about NSKeyedArchiver? It has, for example,
encodeInt32:forKey: but no unsigned equivalent. What should one do if
one wants to encode a uint32? Are there sign extension dangers here?
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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