This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] libstdc++/9817 or "passing C++ strings to C functions"
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org, Nathan Myers <ncm at cantrip dot org>, bkoz at redhat dot com, sebor at roguewave dot com
- Date: Mon, 24 Feb 2003 13:02:38 +0100
- Subject: Re: [RFC] libstdc++/9817 or "passing C++ strings to C functions"
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F552F@nike.hir.is>
Pétur Runólfsson wrote:
Paolo Carlini wrote:
However, I have a major concern: what about the similar issue
we have with
collate::transform? collate::compare and collate::transform
should be fixed in a
similar way, not only for general consistency sake, but also
because they must
be able to work together.
Isn't it possible to use the same strategy? That is break the
string into chunks separated by \0, then transform each chunk
with strxfrm (again, untested code):
Interesting.
Do you believe that proceeding in this way the corresponding
results are always consistent?
I mean, collate::transform and then plain string compare always
give the same result of collate::compare?
If this is the case, you approach should be preferred.
Paolo.