diff options
author | Andy Wingo <wingo@pobox.com> | 2016-04-22 21:32:05 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-04-23 15:21:43 +0200 |
commit | 99899b7c9c360cc382ba3fbb05bae5265313b9ac (patch) | |
tree | b2876dc9b4a18a646879b818c96d9259e57da3ed /libguile/ioext.c | |
parent | 69a1b83f31824cc23c7c4d60144de2225517c76f (diff) | |
download | guile-99899b7c9c360cc382ba3fbb05bae5265313b9ac.tar.gz |
Remove scm_flush_unlocked / scm_end_input_unlocked
* libguile/ports.h (scm_flush_unlocked, scm_end_input_unlocked):
Remove.
* libguile/ports.c (scm_c_read_bytes_unlocked):
(scm_i_unget_bytes_unlocked, scm_setvbuf, scm_force_output)
(scm_fill_input_unlocked, scm_c_write_bytes_unlocked)
(scm_c_write_unlocked, scm_lfwrite_unlocked, scm_seek)
(scm_truncate_file, flush_output_port): Call scm_flush / scm_end_input
instead of the _unlocked variants.
(scm_end_input): Lock while discarding the input buffer but not while
calling out to the seek function.
* libguile/filesys.c (scm_fsync):
* libguile/ioext.c (scm_redirect_port):
* libguile/read.c (scm_i_scan_for_encoding):
* libguile/rw.c (scm_write_string_partial): Use scm_flush, not
scm_flush_unlocked.
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 3f0a53f5d..f39771eec 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -89,14 +89,14 @@ SCM_DEFINE (scm_redirect_port, "redirect-port", 2, 0, 0, /* Ensure there is nothing in either port's input or output buffers. */ if (SCM_OUTPUT_PORT_P (old)) - scm_flush_unlocked (old); - if (SCM_INPUT_PORT_P (old)) - scm_end_input_unlocked (old); + scm_flush (old); + if (SCM_INPUT_PORT_P (old) && SCM_PTAB_ENTRY (old)->rw_random) + scm_end_input (old); if (SCM_OUTPUT_PORT_P (new)) - scm_flush_unlocked (new); - if (SCM_INPUT_PORT_P (new)) - scm_end_input_unlocked (new); + scm_flush (new); + if (SCM_INPUT_PORT_P (new) && SCM_PTAB_ENTRY (new)->rw_random) + scm_end_input (new); ans = dup2 (oldfd, newfd); if (ans == -1) |