> Reading through the latest version of string.c, pondering the > best way to integrate the grey and (what colour is cvs parrot?) > versions, I came across the following line in unmake_COW: > s->buflen = s->strlen; > which got be a little confused - I seem to recall buflen as being > in bytes, and strlen as being in encoding-defined characters. > Did something change when I wasn't looking, or is this a bug > just waiting for somebody to actually implement Unicode?
Yep, you're right, that's definitely a bug waiting for unicode. My intention there was to only copy as much data as was needed when we uncowify a buffer. I believe changing strlen to bufused is the proper fix, and have committed said change. Thanks, Mike Lambert