1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Remove scm_t_port_internal

* libguile/ports-internal.h (SCM_PORT): Rename from SCM_PTAB_ENTRY.
  (scm_t_port_internal, SCM_PORT_GET_INTERNAL): Remove.
  (SCM_FILENAME, SCM_SET_FILENAME, SCM_LINUM, SCM_COL): Adapt.
* libguile/ports.c:
* libguile/poll.c:
* libguile/ioext.c:
* libguile/fports.c:
* libguile/filesys.c:
* libguile/print.c:
* libguile/read.c:
* libguile/rw.c:
* libguile/strings.c: Adapt.
This commit is contained in:
Andy Wingo 2016-05-13 11:34:52 +02:00
parent e5d2f4e566
commit 08574987d9
10 changed files with 142 additions and 154 deletions

View file

@ -91,20 +91,19 @@ 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_PORT_GET_INTERNAL (old)->rw_random)
if (SCM_INPUT_PORT_P (old) && SCM_PORT (old)->rw_random)
scm_end_input (old);
if (SCM_OUTPUT_PORT_P (new))
scm_flush (new);
if (SCM_INPUT_PORT_P (new) && SCM_PORT_GET_INTERNAL (new)->rw_random)
if (SCM_INPUT_PORT_P (new) && SCM_PORT (new)->rw_random)
scm_end_input (new);
ans = dup2 (oldfd, newfd);
if (ans == -1)
SCM_SYSERROR;
SCM_PORT_GET_INTERNAL (new)->rw_random =
SCM_PORT_GET_INTERNAL (old)->rw_random;
SCM_PORT (new)->rw_random = SCM_PORT (old)->rw_random;
}
return SCM_UNSPECIFIED;
}