diff options
author | Andy Wingo <wingo@pobox.com> | 2016-05-13 11:21:41 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-05-13 11:27:37 +0200 |
commit | e5d2f4e566586f768bda99c28a74fd2303ecace1 (patch) | |
tree | 71fead353c58b0a42e7c3dbf71bd4e9d884297b4 /libguile/ioext.c | |
parent | 9a9e0cceae8433ba45e2ab9b37c02dd3b3c71d9a (diff) | |
download | guile-e5d2f4e566586f768bda99c28a74fd2303ecace1.tar.gz |
Make scm_t_port private
* libguile/ports-internal.h (enum scm_port_encoding_mode): Remove unused
enum.
(scm_t_port_internal, scm_t_port): Make encoding and
conversion_strategy private. Instead of scm_t_port_internal containing
scm_t_port, now that all members are private, we can store the user's
"stream" in a word in the port object itself and make the whole of
scm_t_port private. The next commit will remove scm_t_port_internal.
(SCM_PTAB_ENTRY, SCM_PORT_DESCRIPTOR): Make private.
* libguile/ports.c (scm_c_make_port_with_encoding): Adapt to new port
layout.
(scm_port_print): Use SCM_PTAB_ENTRY when printing.
* libguile/ports.h: Remove scm_t_port definition.
* libguile/ioext.c (get_matching_port): Simplify.
* libguile/fports.c (scm_i_evict_port): Simplify.
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 36ca07baa..68f069313 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -276,10 +276,8 @@ static SCM get_matching_port (void *closure, SCM port, SCM result) { int fd = * (int *) closure; - scm_t_port *entry = SCM_PTAB_ENTRY (port); - if (SCM_OPFPORTP (port) - && ((scm_t_fport *) entry->stream)->fdes == fd) + if (SCM_OPFPORTP (port) && SCM_FSTREAM (port)->fdes == fd) result = scm_cons (port, result); return result; |