stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r416537 - /incubator/stdcxx/trunk/tests/src/char.cpp
Date Fri, 23 Jun 2006 15:56:13 GMT
Anton Pevtsov wrote:
> Martin, I have a question about the change in char.cpp. It results in
> the following:
> 
> 1) The strings beginning with '\0' and requiring expand will not be
> expanded.

You mean something like "\0@3" or "\0a@3"?

> 2) The strings with '\0' at the end will be expanded incorrectly
> (without last symbol).
> 
> Is this expected?

No, it's not. The test for the function seems to be exercising
these cases and none of them fails. Can you show me an example
where the function behaves unexpectedly?

FYI, I made the changes to prevent rw_match() errors in cases
like:

     rw_match ("abc", "abcdef", 6)

The function would call memchr(s1, '@', 6), which is wrong
because s1 is only 4 characters long (including the terminating
NUL).

Martin

Mime
View raw message