diff options
author | Andy Wingo <wingo@pobox.com> | 2011-11-08 00:46:41 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-11-08 00:55:06 +0100 |
commit | f209aeee9fc5032863cc07138be927da87d3a091 (patch) | |
tree | e8c4e1e701bc9081d5119613e1cf2a338daba601 /libguile/numbers.c | |
parent | 0607ebbfcf63dc81e4bc2b10f3a8c3bc0d348c09 (diff) |
locking for write, lfwrite
* libguile/ports.c (scm_c_write_unlocked, scm_c_write)
(scm_lfwrite_unlocked, scm_lfwrite): Add locking and _unlocked
variants. Change uses to _unlocked.
Diffstat (limited to 'libguile/numbers.c')
-rw-r--r-- | libguile/numbers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c index 96e176590..54351d6c9 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -5318,7 +5318,7 @@ int scm_print_real (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED) { char num_buf[FLOBUFLEN]; - scm_lfwrite (num_buf, iflo2str (sexp, num_buf, 10), port); + scm_lfwrite_unlocked (num_buf, iflo2str (sexp, num_buf, 10), port); return !0; } @@ -5326,7 +5326,7 @@ void scm_i_print_double (double val, SCM port) { char num_buf[FLOBUFLEN]; - scm_lfwrite (num_buf, idbl2str (val, num_buf, 10), port); + scm_lfwrite_unlocked (num_buf, idbl2str (val, num_buf, 10), port); } int @@ -5334,7 +5334,7 @@ scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate SCM_UNUSED) { char num_buf[FLOBUFLEN]; - scm_lfwrite (num_buf, iflo2str (sexp, num_buf, 10), port); + scm_lfwrite_unlocked (num_buf, iflo2str (sexp, num_buf, 10), port); return !0; } @@ -5342,7 +5342,7 @@ void scm_i_print_complex (double real, double imag, SCM port) { char num_buf[FLOBUFLEN]; - scm_lfwrite (num_buf, icmplx2str (real, imag, num_buf, 10), port); + scm_lfwrite_unlocked (num_buf, icmplx2str (real, imag, num_buf, 10), port); } int @@ -5360,7 +5360,7 @@ scm_bigprint (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED) { char *str = mpz_get_str (NULL, 10, SCM_I_BIG_MPZ (exp)); scm_remember_upto_here_1 (exp); - scm_lfwrite (str, (size_t) strlen (str), port); + scm_lfwrite_unlocked (str, (size_t) strlen (str), port); free (str); return !0; } |