You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2007/06/25 20:38:00 UTC

Re: svn commit: r550545 - in /incubator/stdcxx/trunk/tests/localization: 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 22.locale.ctype.toupper.cpp

faridz@apache.org wrote:
> Author: faridz
> Date: Mon Jun 25 09:50:10 2007
> New Revision: 550545

Thanks for taking care of this! IIRC, you made a similar change
before, suggesting the rw_locales() API is error-prone. I wonder
if we should change it so as to return "" instead of 0 on error.

Incidentally, why does it fail in your environment?

Martin


Re: svn commit: r550545 - in /incubator/stdcxx/trunk/tests/localization: 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 22.locale.ctype.toupper.cpp

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:sebor@roguewave.com] 
>> Sent: Monday, June 25, 2007 9:38 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: svn commit: r550545 - in 
>> /incubator/stdcxx/trunk/tests/localization: 
>> 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 
>> 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 
>> 22.locale.ctype.toupper.cpp
>>
>> faridz@apache.org wrote:
>>> Author: faridz
>>> Date: Mon Jun 25 09:50:10 2007
>>> New Revision: 550545
>> Thanks for taking care of this! IIRC, you made a similar 
>> change before, suggesting the rw_locales() API is 
>> error-prone. I wonder if we should change it so as to return 
>> "" instead of 0 on error.
>>
>> Incidentally, why does it fail in your environment?
> 
>   When I run the test only, the locale.exe utility not in the path
> and then the rw_locales() returns NULL. And later when the test
> iterating through the list I got access violation.
> 
>   I aggree to change rw_locales() to return something but not NULL.
> Perhaps rw_locales() should return "C"? I assume that "C" locale is
> always available, isn't it?

Yes, it is. That might make more sense than returning "".
Actually, it will need to be "C\0", i.e., there must be
two NULs at the end of the string.

Martin

RE: svn commit: r550545 - in /incubator/stdcxx/trunk/tests/localization: 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 22.locale.ctype.toupper.cpp

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Monday, June 25, 2007 9:38 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r550545 - in 
> /incubator/stdcxx/trunk/tests/localization: 
> 22.locale.ctype.is.cpp 22.locale.ctype.narrow.cpp 
> 22.locale.ctype.scan.cpp 22.locale.ctype.tolower.cpp 
> 22.locale.ctype.toupper.cpp
> 
> faridz@apache.org wrote:
> > Author: faridz
> > Date: Mon Jun 25 09:50:10 2007
> > New Revision: 550545
> 
> Thanks for taking care of this! IIRC, you made a similar 
> change before, suggesting the rw_locales() API is 
> error-prone. I wonder if we should change it so as to return 
> "" instead of 0 on error.
> 
> Incidentally, why does it fail in your environment?

  When I run the test only, the locale.exe utility not in the path
and then the rw_locales() returns NULL. And later when the test
iterating through the list I got access violation.

  I aggree to change rw_locales() to return something but not NULL.
Perhaps rw_locales() should return "C"? I assume that "C" locale is
always available, isn't it?

Farid.