mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Make scm_nullstr mutable
* libguile/strings.c (scm_init_strings): Make scm_nullstr mutable. It is still usable as a common object, because of course it contains no characters to mutate anyway. It is returned by several procedures that are specified to return mutable strings, and string mutators raise errors when passed an immutable string, even if it is the null string.
This commit is contained in:
parent
213544e0dc
commit
a7e392c1ff
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1995,1996,1998,2000,2001, 2004, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 1995,1996,1998,2000,2001, 2004, 2006, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -2224,7 +2224,7 @@ SCM_VECTOR_IMPLEMENTATION (SCM_ARRAY_ELEMENT_TYPE_CHAR, scm_make_string)
|
||||||
void
|
void
|
||||||
scm_init_strings ()
|
scm_init_strings ()
|
||||||
{
|
{
|
||||||
scm_nullstr = scm_i_make_string (0, NULL, 1);
|
scm_nullstr = scm_i_make_string (0, NULL, 0);
|
||||||
|
|
||||||
#include "libguile/strings.x"
|
#include "libguile/strings.x"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue