[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copy-on-write strings and mutation-sharing strings
From: |
Marius Vollmer |
Subject: |
Re: Copy-on-write strings and mutation-sharing strings |
Date: |
Sun, 22 Aug 2004 09:44:15 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Kevin Ryde <address@hidden> writes:
> Marius Vollmer <address@hidden> writes:
>>
>> go crazy and try to break them!
>
> The build script (the scheme bit, not any C code) in the guile-gtk-1.2
> cvs exposes some breakage. It bombs in a string-ref, looking like
> taking a substring has caused truncation of the originating string,
> maybe.
Now that is embarassing! I got the substring operation totally wrong,
not taking into account that the substringed string might itself be a
substring.
I don't have time right now to fix it, but this is so embarrasing, I
must start blathering right away about how embarassing it is... should
be fixed today.
A simple test case is:
guile> (substring (substring "0123456789" 3) 0 4)
"0123"
The second substring gets a string with STRING_START != 0, which is
totally ignored. Also mutation-sharing substrings would crash Guile,
as in:
guile> (substring (substring/shared "0123456789" 3) 0 4)
"'\x02
\x00"
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405