Re: NSNotFound signed???
Re: NSNotFound signed???
- Subject: Re: NSNotFound signed???
- From: Oleg Krupnov <email@hidden>
- Date: Wed, 12 Jun 2013 11:14:35 +0300
> there isn't enough address space to create a NSArray containing even NSIntegerMax pointers.
I knew someone will say this. Who needs more than 640 KB RAM after
all? :) © Bill Gates
What if I have sparse array etc.
One higher bit is actually twice as many elements. Why having
NSUInteger at all if you can't use more than NSIntegerMax? This
doesn't seem right.
Anyway thanks for your time, Quincey!
On Wed, Jun 12, 2013 at 10:52 AM, Quincey Morris
<email@hidden> wrote:
> On Jun 12, 2013, at 00:42 , Quincey Morris
> <email@hidden> wrote:
>
> If you archive a 64-bit NSNotFound, it's no longer NSNotFound when
> unarchived on a 32-bit architecture, and vice versa.
>
>
> Oops, just to clarify:
>
> I don't mean there's anything wrong with the archiving or unarchiving per
> se.
>
> It's no longer NSNotFound when you encode/decode a NSUInteger/NSInteger
> variable, because there'll be truncation or "incorrect" sign extension of
> the scalar value, in one direction or the other.
>
_______________________________________________
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