This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Collation implementation


Hi,

> Isn't that the approach taken in glibc as well? You define an
> interface to the underlying data, and then use it to put the C locale
> and the C++ locale interfaces on top of it.

That's correct. The difference I see is that the interface defined by
Matt is already used eg. in SGI and my locale implementation while I
assume from the discussion here that the glibc interface is not yet
used in the libstdc++ implementation... The advantage of sharing the
same interface between different standard C++ library implementations
is that it is still only necessary to create the code for the locale
data access only once without requiring the use of a specific standard
C++ library.

I can't tell why Matt hadn't used the "__newlocale()" interface but my
guess would be that it is not clearly documented what has to be
implemented when porting the interface to a different system where
glibc is not used. I haven't looked at "__newlocale()" enough to tell
whether both approaches are equivalent. In any case Matt's interface
seems to allow the use of basically any locale library underneath which
in turn would allow the user to choose which library to use. This might
also hold for the "__newlocale()" stuff, though.


=====
<mailto:dietmar_kuehl@yahoo.com>
<http://www.dietmar-kuehl.de/>

__________________________________________________
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.com/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]