mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
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.
This commit is contained in:
parent
95c1cfb550
commit
190d4b0d93
13 changed files with 83 additions and 56 deletions
|
@ -1426,7 +1426,7 @@ SCM_DEFINE (scm_recv, "recv!", 2, 1, 0,
|
|||
"use a bytevector instead.");
|
||||
|
||||
len = scm_i_string_length (buf);
|
||||
msg = scm_i_make_string (len, &dest);
|
||||
msg = scm_i_make_string (len, &dest, 0);
|
||||
SCM_SYSCALL (rv = recv (fd, dest, len, flg));
|
||||
scm_string_copy_x (buf, scm_from_int (0),
|
||||
msg, scm_from_int (0), scm_from_size_t (len));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue