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/strings.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/strings.c')
-rw-r--r-- | libguile/strings.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libguile/strings.c b/libguile/strings.c index cdbc3587f..a153d29ab 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1145,7 +1145,6 @@ SCM_DEFINE (scm_string, "string", 0, 0, 1, char *buf; result = scm_i_make_string (len, NULL, 0); - result = scm_i_string_start_writing (result); buf = scm_i_string_writable_chars (result); while (len > 0 && scm_is_pair (rest)) { @@ -1162,7 +1161,6 @@ SCM_DEFINE (scm_string, "string", 0, 0, 1, scm_t_wchar *buf; result = scm_i_make_wide_string (len, NULL, 0); - result = scm_i_string_start_writing (result); buf = scm_i_string_writable_wide_chars (result); while (len > 0 && scm_is_pair (rest)) { @@ -1174,7 +1172,6 @@ SCM_DEFINE (scm_string, "string", 0, 0, 1, scm_remember_upto_here_1 (elt); } } - scm_i_string_stop_writing (); if (len > 0) scm_misc_error (NULL, "list changed while constructing string", SCM_EOL); @@ -1211,10 +1208,8 @@ scm_c_make_string (size_t len, SCM chr) else { SCM_VALIDATE_CHAR (0, chr); - res = scm_i_string_start_writing (res); for (p = 0; p < len; p++) scm_i_string_set_x (res, p, SCM_CHAR (chr)); - scm_i_string_stop_writing (); } return res; |