[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 07:27:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> Anyway, it seems that before, you couldn’t get any encoding error for
> scm_from_stringn ("", "SOME-ENCODING"), whereas now you can.
Good point. I just committed a change to avoid this.
> A related question: can we have both narrow and wide empty strings?
I see one place where a wide null string could be created: vm-i-loader.c
line 115, within the "load-wide-string" vm instruction, calls
`scm_i_make_wide_string' but never calls `scm_i_try_narrow_string' as is
usually done. I guess this might be because "load-wide-string" is
normally never used for strings that contain only Latin 1 characters.
Other than that, I don't see how a wide null string could exist outside
of temporaries, although it's hard to entirely rule out the possibility.
All of the code paths try to avoid using wide strings unless a wide
character is actually present.
If a wide null string did exist, I don't see what harm it would cause,
besides causing failure if `scm_i_string_chars' applied to it.
Thanks,
Mark
- Re: The empty string and other empty strings, (continued)
- 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
- Re: The empty string and other empty strings, Andy Wingo, 2012/01/20
- Re: The empty string and other empty strings, David Kastrup, 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, Ludovic Courtès, 2012/01/10
- Re: The empty string and other empty strings, David Kastrup, 2012/01/10
- Re: Guile BUG: What's wrong with this?, Bruce Korb, 2012/01/06
- Re: Guile: What's wrong with this?, Ian Price, 2012/01/07
- Re: Guile: What's wrong with this?, Mark H Weaver, 2012/01/08
- Re: Guile: What's wrong with this?, David Kastrup, 2012/01/06
- Re: Guile: What's wrong with this?, David Kastrup, 2012/01/05
- Re: Guile: What's wrong with this?, Ludovic Courtès, 2012/01/04
- Re: Guile: What's wrong with this?, Mike Gran, 2012/01/03
- Re: Guile: What's wrong with this?, nalaginrut, 2012/01/04