Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/locale



> On Tue, Apr 16, 2013 at 11:39:50PM +0900, Takehiko NOZAKI wrote:
>> so that the struct _locale __C_locale in libc is much more wasteful.
> 
> I should add that it is an internal detail and the way the composed C
> locale is stored can and likely will change later. So the way it is
> essentially a copy of (old) global locale is just a way to be minimally
> intrusive.
> 
> Joerg

i care the API.

if you really want it be in libc, how about having libc provide a
"locale_t get_static_c_locale();" style API rather than using NULL?
it's better because 1) less code in *_l, 2) autoconf-like can detect
the extension easily, and 3) a portable application can trivially
have a fallback implementation using newlocale+pthread_once.

YAMAMOTO Takashi


Home | Main Index | Thread Index | Old Index