From 190d4b0d93599e5b58e773dc6375054c3a6e3dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 20 Mar 2011 23:34:42 +0100 Subject: Make VM string literals immutable. * libguile/strings.c (scm_i_make_string, scm_i_make_wide_string): Add `read_only_p' parameter. All callers updated. * libguile/vm-i-loader.c (load_string, load_wide_string): Push read-only strings. * test-suite/tests/strings.test ("literals"): New test prefix. --- libguile/srfi-14.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libguile/srfi-14.c') diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index b22471de4..e2f66681a 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -1515,9 +1515,9 @@ SCM_DEFINE (scm_char_set_to_string, "char-set->string", 1, 0, 0, count = scm_to_int (scm_char_set_size (cs)); if (wide) - result = scm_i_make_wide_string (count, &wbuf); + result = scm_i_make_wide_string (count, &wbuf, 0); else - result = scm_i_make_string (count, &buf); + result = scm_i_make_string (count, &buf, 0); for (k = 0; k < cs_data->len; k++) for (n = cs_data->ranges[k].lo; n <= cs_data->ranges[k].hi; n++) -- cgit v1.2.1