[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSLocale
From: |
David Chisnall |
Subject: |
Re: NSLocale |
Date: |
Fri, 2 Jul 2010 16:37:17 +0100 |
Hi Stef,
On 2 Jul 2010, at 16:23, Stef Bidi wrote:
> There's also some stuff that might be better placed in the NSNumber class,
> but, from what I can see, will require a complete overhaul of that class to
> make it match 10.4 behavior
Can you clarify this a bit? The class got a complete overhaul a couple of
months ago when I did a complete rewrite. I can confirm that it does the same
thing for -descriptionWithLocale: that OS X 10.6 does, which is NOT what the
documentation says. The Cocoa version, like the new GNUstep version, does not
differentiate between objects based on how they were created.
If you create an NSNumber using numberWithChar, for example, it stores it as an
int (same with a short - malloc() on OS X, like most modern platforms, provides
word-aligned allocations, so there is no space saving possible).
When you send descriptionWithLocale: to the object, it sends an
-initWithString: message to an NSString, with %d as the format string (GNUstep
uses %i, which is what the Apple docs say Apple's implementation uses. Ho hum
- this is a small fix if anyone can be bothered to make it).
David
-- Sent from my IBM 1620
- NSLocale, Stef Bidi, 2010/07/02
- Re: NSLocale,
David Chisnall <=