[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The empty string and other empty strings
From: |
Mark H Weaver |
Subject: |
Re: The empty string and other empty strings |
Date: |
Tue, 10 Jan 2012 08:03:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Mike Gran <address@hidden> writes:
> Right now it seems that zero-length shared substring of a wide string is
> wide. A zero-length substring still shares the stringbuf of the
> original string.
[...]
> What do you think about that? Do zero-length substrings need to
> still share stringbufs with their parent strings?
I think the answer is: no they don't, and avoiding that might be a
worthwhile optimization, mainly to avoid needlessly holding a reference
to a potentially large stringbuf.
> In any case, a string-copy of a narrow substring of an otherwise wide string
> should be a new narrow string. This should apply to zero-length
> substrings as well. This isn't happening, because we're missing
> a scm_i_try_narrow_string in string-copy, which is a bug.
I just fixed this.
> Looks like for zero-length input strings, u32_conv_from_encoding can
> return NULL.
Interesting! Anyway, we now avoid calling `u32_conv_from_encoding' for
empty strings.
Thanks,
Mark
- Re: Guile BUG: What's wrong with this?, (continued)
- Re: Guile BUG: What's wrong with this?, David Kastrup, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mark H Weaver, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Mike Gran, 2012/01/07
- Re: Guile BUG: What's wrong with this?, Ludovic Courtès, 2012/01/07
- The empty string and other empty strings, Ludovic Courtès, 2012/01/10
- Re: The empty string and other empty strings, Mike Gran, 2012/01/10
- Re: The empty string and other empty strings,
Mark H Weaver <=
- Re: The empty string and other empty strings, Mike Gran, 2012/01/10
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/10
- Re: The empty string and other empty strings, David Kastrup, 2012/01/10
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/10
- Re: The empty string and other empty strings, Ludovic Courtès, 2012/01/12
- Re: The empty string and other empty strings, David Kastrup, 2012/01/13
- Re: The empty string and other empty strings, Mark H Weaver, 2012/01/13
- Re: The empty string and other empty strings, David Kastrup, 2012/01/13
- Re: The empty string and other empty strings, Marijn, 2012/01/16
- Re: The empty string and other empty strings, David Kastrup, 2012/01/16