diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-16 10:43:23 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-16 10:43:23 +0100 |
commit | c38b9625c88f4d1760068926273b6d89ffbd4527 (patch) | |
tree | 7b768c8b10eb8eb687daa4fd4ef323a19c01d428 /libguile/read.c | |
parent | cd3ff33a31c51612f2247bdb15ecbe92d7da1310 (diff) | |
download | guile-c38b9625c88f4d1760068926273b6d89ffbd4527.tar.gz |
Remove unnecessary scm_i_string_start_writing calls
* libguile/strings.c (scm_string, scm_c_make_string):
* libguile/srfi-13.c (scm_reverse_list_to_string, scm_string_map)
(scm_string_unfold, scm_string_unfold_right, scm_xsubstring)
(scm_string_filter, scm_string_delete): Remove
scm_i_string_start_writing / scm_i_string_stop_writing calls around
fresh strings that aren't visible to other threads.
Diffstat (limited to 'libguile/read.c')
-rw-r--r-- | libguile/read.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/read.c b/libguile/read.c index 085cdb9f1..0946ff379 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -1556,7 +1556,8 @@ scm_read_extended_symbol (scm_t_wchar chr, SCM port) size_t len = 0; SCM buf = scm_i_make_string (1024, NULL, 0); - buf = scm_i_string_start_writing (buf); + /* No need to scm_i_string_start_writing (), as the string isn't + visible to any other thread. */ while ((chr = scm_getc (port)) != EOF) { @@ -1620,16 +1621,13 @@ scm_read_extended_symbol (scm_t_wchar chr, SCM port) { SCM addy; - scm_i_string_stop_writing (); addy = scm_i_make_string (1024, NULL, 0); buf = scm_string_append (scm_list_2 (buf, addy)); len = 0; - buf = scm_i_string_start_writing (buf); } } done: - scm_i_string_stop_writing (); if (chr == EOF) scm_i_input_error ("scm_read_extended_symbol", port, "end of file while reading symbol", SCM_EOL); |