summaryrefslogtreecommitdiff
path: root/libguile/ports-internal.h
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/ports-internal.h
parent4934b69ddfb70d59b6ede6538b48da8ddea70a11 (diff)
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/ports-internal.h')
-rw-r--r--libguile/ports-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/ports-internal.h b/libguile/ports-internal.h
index 19e49a7bd..5eeefb9b7 100644
--- a/libguile/ports-internal.h
+++ b/libguile/ports-internal.h
@@ -232,6 +232,12 @@ typedef struct scm_port_internal scm_t_port_internal;
#define SCM_PORT_GET_INTERNAL(x) (SCM_PTAB_ENTRY(x)->internal)
+typedef enum scm_t_port_rw_active {
+ SCM_PORT_NEITHER = 0,
+ SCM_PORT_READ = 1,
+ SCM_PORT_WRITE = 2
+} scm_t_port_rw_active;
+
SCM_INTERNAL scm_t_iconv_descriptors *
scm_i_port_iconv_descriptors (SCM port, scm_t_port_rw_active mode);