This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: [v3] Fix stringbuf handling of NUL characters


On Fri, Jul 13, 2001 at 08:50:14AM +0200, Gabriel Dos Reis wrote:
> Phil Edwards <pedwards@disaster.jaj.com> writes:
> | Since we're talking about NUL characters in the middle of the data,
> | I would argue that it's a meaningless distinction.
> 
> I don't think so.  Calling c_str() doesn't give the whole characters.

But that's not c_str()'s fault.  Both c_str() and data() simply return a
pointer to the character string.  A second NUL character (which will never
be seen) won't make any difference.

It's just occurred to me that we may be talking about different things
anyhow.  :-)


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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