• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting true 32-bit integers with NSNumber?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting true 32-bit integers with NSNumber?


  • Subject: Re: Getting true 32-bit integers with NSNumber?
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 02 Dec 2013 02:25:57 -0800

> On Dec 1, 2013, at 11:10 PM, Alex Hall <email@hidden> wrote:
>
> 				NSUInteger sourceID = [[(NSDictionary*)sourceNumber objectForKey:@"sourceID"] unsignedIntegerValue];

Again, -unsignedIntValue will return a 32-bit value (int); -unsignedIntegerValue will give you an NSUInteger, which will be 64 bits on 64-bit targets.

The method used to construct the NSNumber is irrelevant. The only thing that matters is how you ask for it back. You're asking for a 64-bit value here.

--Kyle Sluder
_______________________________________________

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


References: 
 >Getting true 32-bit integers with NSNumber? (From: Alex Hall <email@hidden>)
 >Re: Getting true 32-bit integers with NSNumber? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Getting true 32-bit integers with NSNumber?
  • Next by Date: Re: Getting true 32-bit integers with NSNumber?
  • Previous by thread: Re: Getting true 32-bit integers with NSNumber?
  • Next by thread: Re: I need an entry point for live video grabbing
  • Index(es):
    • Date
    • Thread