summaryrefslogtreecommitdiff
path: root/libguile/read.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-04-22 21:08:30 +0200
committerAndy Wingo <wingo@pobox.com>2016-04-22 21:08:30 +0200
commit69a1b83f31824cc23c7c4d60144de2225517c76f (patch)
treeea2f9bc7be71184f6d54fbefd5e1b67e86ccbe0f /libguile/read.c
parent4934b69ddfb70d59b6ede6538b48da8ddea70a11 (diff)
downloadguile-69a1b83f31824cc23c7c4d60144de2225517c76f.tar.gz
Remove port rw_active field
* libguile/ports.h (scm_t_port_rw_active): Move type definition to ports-internal.h. (scm_t_port): Remove rw_active field. It's sufficient to check the port buffer cursors. * libguile/read.c (scm_i_scan_for_encoding): Just call scm_flush_unlocked; it's idempotent. * libguile/ports.c (scm_c_make_port_with_encoding): Remove rw_active field. (scm_c_read_bytes_unlocked, scm_c_read, scm_i_unget_bytes_unlocked) (scm_end_input_unlocked, scm_flush_unlocked, scm_fill_input_unlocked) (scm_port_write_buffer, scm_port_read_buffer) (scm_c_write_bytes_unlocked, scm_c_write_unlocked, scm_seek): Remove management of rw_active field.
Diffstat (limited to 'libguile/read.c')
-rw-r--r--libguile/read.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libguile/read.c b/libguile/read.c
index 75f042377..c7ba4e7e4 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -2068,11 +2068,7 @@ scm_i_scan_for_encoding (SCM port)
buf = pt->read_buf;
if (pt->rw_random)
- {
- if (pt->rw_active == SCM_PORT_WRITE)
- scm_flush_unlocked (port);
- pt->rw_active = SCM_PORT_READ;
- }
+ scm_flush_unlocked (port);
if (scm_port_buffer_can_take (buf) == 0)
{