On Thu, 31 May 2007 23:09:54 -0700 Mark Glines <[EMAIL PROTECTED]> wrote: > The code in utf8_encode_and_advance is beautiful. It basically says, > add a utf8 character to the buffer. Ok, now did we overrun the > buffer? CRASH!
So if I add a call to Parrot_reallocate_string if the buffer isn't big enough, I get a warning about the const flag being discarded on i->str. I could just cast around it, but it makes me wonder: if String_iter's STRING member is const, then why are we writing to it? I guess I'm hoping someone can explain the purpose of String_iter. To me it just looks like an abstraction to hide the details of UTF8 or UCS32 or whatever encoding, but this doesn't explain why the string needs to be const. Mark