diff options
author | Andy Wingo <wingo@pobox.com> | 2016-05-13 10:58:19 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-05-13 10:58:19 +0200 |
commit | 9a9e0cceae8433ba45e2ab9b37c02dd3b3c71d9a (patch) | |
tree | a51c40f49793c3c984a13d758001fb72097dee45 /libguile/ioext.c | |
parent | 8af64975be43a5055e6a74e9eef89a9c9955af7d (diff) | |
download | guile-9a9e0cceae8433ba45e2ab9b37c02dd3b3c71d9a.tar.gz |
Make port buffering fields private
* libguile/ports-internal.h (enum scm_port_buffer_field)
(scm_t_port_internal): Make port buffering fields private.
* libguile/ports.h (scm_t_port): Adapt.
* libguile/filesys.c (set_element):
* libguile/ioext.c (scm_redirect_port):
* libguile/poll.c (scm_primitive_poll):
* libguile/ports.c:
* libguile/read.c (scm_i_scan_for_encoding):
* libguile/rw.c (scm_write_string_partial): Adapt users.
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index f39771eec..36ca07baa 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -34,6 +34,7 @@ #include "libguile/hashtab.h" #include "libguile/ioext.h" #include "libguile/ports.h" +#include "libguile/ports-internal.h" #include "libguile/strings.h" #include "libguile/validate.h" @@ -90,19 +91,20 @@ SCM_DEFINE (scm_redirect_port, "redirect-port", 2, 0, 0, buffers. */ if (SCM_OUTPUT_PORT_P (old)) scm_flush (old); - if (SCM_INPUT_PORT_P (old) && SCM_PTAB_ENTRY (old)->rw_random) + if (SCM_INPUT_PORT_P (old) && SCM_PORT_GET_INTERNAL (old)->rw_random) scm_end_input (old); if (SCM_OUTPUT_PORT_P (new)) scm_flush (new); - if (SCM_INPUT_PORT_P (new) && SCM_PTAB_ENTRY (new)->rw_random) + if (SCM_INPUT_PORT_P (new) && SCM_PORT_GET_INTERNAL (new)->rw_random) scm_end_input (new); ans = dup2 (oldfd, newfd); if (ans == -1) SCM_SYSERROR; - SCM_PTAB_ENTRY (new)->rw_random = SCM_PTAB_ENTRY (old)->rw_random; + SCM_PORT_GET_INTERNAL (new)->rw_random = + SCM_PORT_GET_INTERNAL (old)->rw_random; } return SCM_UNSPECIFIED; } |