1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +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

@ -285,19 +285,16 @@ struct scm_port
};
typedef struct scm_port scm_t_port;
typedef scm_t_port scm_t_port_internal;
#define SCM_PTAB_ENTRY(x) ((scm_t_port *) SCM_CELL_WORD_2 (x))
#define SCM_PORT(x) ((scm_t_port *) SCM_CELL_WORD_2 (x))
#define SCM_PORT_DESCRIPTOR(port) ((scm_t_ptob_descriptor *) SCM_CELL_WORD_3 (port))
#define SCM_UNICODE_BOM 0xFEFFUL /* Unicode byte-order mark */
#define SCM_PORT_GET_INTERNAL(x) ((scm_t_port_internal*) SCM_PTAB_ENTRY(x))
#define SCM_FILENAME(x) (SCM_PORT_GET_INTERNAL(x)->file_name)
#define SCM_SET_FILENAME(x, n) (SCM_PORT_GET_INTERNAL(x)->file_name = (n))
#define SCM_LINUM(x) (SCM_PORT_GET_INTERNAL(x)->line_number)
#define SCM_COL(x) (SCM_PORT_GET_INTERNAL(x)->column_number)
#define SCM_FILENAME(x) (SCM_PORT (x)->file_name)
#define SCM_SET_FILENAME(x, n) (SCM_PORT (x)->file_name = (n))
#define SCM_LINUM(x) (SCM_PORT (x)->line_number)
#define SCM_COL(x) (SCM_PORT (x)->column_number)
#define SCM_INCLINE(port) do {SCM_LINUM (port) += 1; SCM_COL (port) = 0;} while (0)
#define SCM_ZEROCOL(port) do {SCM_COL (port) = 0;} while (0)