mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
Remove null string optimization from scm_from_stringn
* libguile/strings.c (scm_from_stringn): Always return a freshly allocated string from scm_from_stringn, even when asked to construct the null string, in accordance with the R5RS. Previously, we optimized the null string case by returning a reference to a global null string object (scm_nullstr).
This commit is contained in:
parent
0e947e1d14
commit
86c63a8251
1 changed files with 0 additions and 2 deletions
|
@ -1472,8 +1472,6 @@ scm_from_stringn (const char *str, size_t len, const char *encoding,
|
|||
scm_misc_error ("scm_from_stringn", "NULL string pointer", SCM_EOL);
|
||||
if (len == (size_t) -1)
|
||||
len = strlen (str);
|
||||
if (len == 0)
|
||||
return scm_nullstr;
|
||||
|
||||
if (encoding == NULL)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue