[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: null terminated strings
From: |
Paul Jarc |
Subject: |
Re: null terminated strings |
Date: |
Fri, 16 Jan 2004 15:36:03 -0500 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
Brian S McQueen <address@hidden> wrote:
> If the scheme string is truly null terminated, this can be greatly
> simplified.
Apparently, whether it is guaranteed to be terminated depends on what
version of Guile you're using. With 1.6.4, it might not be terminated
(judging by the fact that make-shared-substring exists in that
version). But regardless of whether the guarantee is there in
general, you can always make it so for a particular string using
SCM_STRING_COERCE_0TERMINATION_X, as I showed before. Versions of
Guile that guarantee termination can define that macro as a no-op to
support existing code.
FWIW, I think that (preferably copy-on-write) shared substrings are
valuable enough for performance (not to mention backward
compatibility) that Guile should not remove them for the sake of
guaranteeing termination. With shared substrings, we can still get
termination when we need it with SCM_STRING_COERCE_0TERMINATION_X, but
without shared substrings, we cannot get performance when we need it.
paul
- Re: argz SMOB, (continued)
- Re: argz SMOB, Brian S McQueen, 2004/01/15
- Re: argz SMOB, Paul Jarc, 2004/01/15
- null terminated strings (was: argz SMOB), Andreas Voegele, 2004/01/16
- Message not available
- Re: null terminated strings, Andreas Voegele, 2004/01/16
- Re: null terminated strings, Roland Orre, 2004/01/16
- Re: null terminated strings, Andreas Voegele, 2004/01/16
- Re: null terminated strings, Brian S McQueen, 2004/01/16
- Re: null terminated strings,
Paul Jarc <=
- Re: null terminated strings, Tom Lord, 2004/01/16
- Re: null terminated strings, Paul Jarc, 2004/01/16
- Re: null terminated strings, Roland Orre, 2004/01/16
- Re: null terminated strings, Ken Anderson, 2004/01/19
- Re: null terminated strings, Per Bothner, 2004/01/19
- Re: null terminated strings, Ken Anderson, 2004/01/19