[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 06/21: Remove SCM backlink in port structure
From: |
Andy Wingo |
Subject: |
[Guile-commits] 06/21: Remove SCM backlink in port structure |
Date: |
Mon, 16 May 2016 07:39:34 +0000 (UTC) |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit fe7ceff9691e20723d466542b3ff4132d78f2a3b
Author: Andy Wingo <address@hidden>
Date: Fri May 13 10:16:27 2016 +0200
Remove SCM backlink in port structure
* libguile/ports.h (scm_t_port): Remove port backlink.
* libguile/ports.c (scm_c_make_port_with_encoding, scm_fill_input)
(scm_seek): Adapt.
---
libguile/ports.c | 7 +++----
libguile/ports.h | 3 ---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/libguile/ports.c b/libguile/ports.c
index a2509fb..6003129 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -735,7 +735,6 @@ scm_c_make_port_with_encoding (scm_t_bits tag, unsigned
long mode_bits,
entry->internal = pti;
entry->file_name = SCM_BOOL_F;
- entry->port = ret;
entry->stream = stream;
entry->encoding = encoding;
entry->conversion_strategy = conversion_strategy;
@@ -2455,7 +2454,7 @@ scm_fill_input (SCM port, size_t minimum_size)
return read_buf;
if (pt->rw_random)
- scm_flush (pt->port);
+ scm_flush (port);
/* Prepare to read. Make sure there is enough space in the buffer for
minimum_size, and ensure that cur is zero so that we fill towards
@@ -2874,8 +2873,8 @@ SCM_DEFINE (scm_seek, "seek", 3, 0, 0,
/* FIXME: Avoid flushing buffers for SEEK_CUR with an offset of
0. */
- scm_end_input (pt->port);
- scm_flush (pt->port);
+ scm_end_input (fd_port);
+ scm_flush (fd_port);
rv = ptob->seek (fd_port, off, how);
diff --git a/libguile/ports.h b/libguile/ports.h
index f9b6389..84f4e01 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -81,9 +81,6 @@ enum scm_port_buffer_field {
typedef struct
{
- /* Link back to the port object. */
- SCM port;
-
/* Pointer to internal-only port structure. */
struct scm_port_internal *internal;
- [Guile-commits] 01/21: %read-char speedup, (continued)
- [Guile-commits] 01/21: %read-char speedup, Andy Wingo, 2016/05/16
- [Guile-commits] 12/21: Update port documentation, Andy Wingo, 2016/05/16
- [Guile-commits] 04/21: Add (ice-9 sports) module, Andy Wingo, 2016/05/16
- [Guile-commits] 13/21: Make scm_t_ptob_descriptor private., Andy Wingo, 2016/05/16
- [Guile-commits] 15/21: Update port type documentation, Andy Wingo, 2016/05/16
- [Guile-commits] 09/21: Make port buffering fields private, Andy Wingo, 2016/05/16
- [Guile-commits] 16/21: Add SCM_OPN to mode bits when making ports, Andy Wingo, 2016/05/16
- [Guile-commits] 03/21: Beginnings of shunting ports-in-scheme off to a module, Andy Wingo, 2016/05/16
- [Guile-commits] 14/21: Use heap-allocated port types instead of ptobnums, Andy Wingo, 2016/05/16
- [Guile-commits] 11/21: Remove scm_t_port_internal, Andy Wingo, 2016/05/16
- [Guile-commits] 06/21: Remove SCM backlink in port structure,
Andy Wingo <=
- [Guile-commits] 19/21: Remove unused type from ports-internal, Andy Wingo, 2016/05/16
- [Guile-commits] 05/21: Add random_access_p port type method, Andy Wingo, 2016/05/16