[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/18: Remove port equal functions
From: |
Andy Wingo |
Subject: |
[Guile-commits] 08/18: Remove port equal functions |
Date: |
Wed, 06 Apr 2016 17:27:07 +0000 |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit e98f64009d493cb9b3bcd00d3846c96772f00778
Author: Andy Wingo <address@hidden>
Date: Sun Apr 3 12:08:07 2016 +0200
Remove port equal functions
* doc/ref/api-io.texi (Port Implementation): Remove mention of port
equal functions.
* NEWS: Update.
* libguile/ports.c (scm_set_port_equalp): Remove.
* libguile/ports.h (scm_t_ptob_descriptor): Remove equalp function.
---
NEWS | 6 ++++++
doc/ref/api-io.texi | 6 ------
libguile/ports.c | 6 ------
libguile/ports.h | 2 --
4 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/NEWS b/NEWS
index 24c43b7..c5a2a3f 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,12 @@ as arguments to the `setvbuf' function.
Port mark functions have not been called since the switch to the BDW
garbage collector.
+** Remove `scm_set_port_equalp'
+
+Likewise port equal functions weren't being called. Given that ports
+have their own internal buffers, it doesn't make sense to hook them into
+equal? anyway.
+
** Remove `scm_set_port_free'
It used to be that if an open port became unreachable, a special "free"
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index c175d2e..759d339 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -2313,12 +2313,6 @@ The first argument @var{port} is the object being
printed, the second
argument @var{dest_port} is where its description should go.
@end deftypefun
address@hidden equalp
-Not used at present. Set using
-
address@hidden void scm_set_port_equalp (scm_t_bits tc, SCM (*equalp) (SCM,
SCM))
address@hidden deftypefun
-
@item close
Called when the port is closed. It should free any resources used by
the port. Set using
diff --git a/libguile/ports.c b/libguile/ports.c
index e42f983..2c509ea 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -275,12 +275,6 @@ scm_set_port_print (scm_t_bits tc, int (*print) (SCM exp,
SCM port,
}
void
-scm_set_port_equalp (scm_t_bits tc, SCM (*equalp) (SCM, SCM))
-{
- scm_c_port_type_ref (SCM_TC2PTOBNUM (tc))->equalp = equalp;
-}
-
-void
scm_set_port_close (scm_t_bits tc, int (*close) (SCM))
{
scm_c_port_type_ref (SCM_TC2PTOBNUM (tc))->close = close;
diff --git a/libguile/ports.h b/libguile/ports.h
index 379fba2..6b9a006 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -187,7 +187,6 @@ typedef struct scm_t_ptob_descriptor
{
char *name;
int (*print) (SCM exp, SCM port, scm_print_state *pstate);
- SCM (*equalp) (SCM, SCM);
int (*close) (SCM port);
void (*write) (SCM port, const void *data, size_t size);
@@ -228,7 +227,6 @@ SCM_API void scm_set_port_print (scm_t_bits tc,
int (*print) (SCM exp,
SCM port,
scm_print_state *pstate));
-SCM_API void scm_set_port_equalp (scm_t_bits tc, SCM (*equalp) (SCM, SCM));
SCM_API void scm_set_port_close (scm_t_bits tc, int (*close) (SCM));
SCM_API void scm_set_port_needs_close_on_gc (scm_t_bits tc, int needs_close_p);
- [Guile-commits] branch wip-port-refactor created (now 8399e7a), Andy Wingo, 2016/04/06
- [Guile-commits] 08/18: Remove port equal functions,
Andy Wingo <=
- [Guile-commits] 06/18: Remove port mark functions, Andy Wingo, 2016/04/06
- [Guile-commits] 14/18: Fix POLLOUT assignment from port buffers, Andy Wingo, 2016/04/06
- [Guile-commits] 02/18: display-{application, -backtrace} delegate to Scheme, Andy Wingo, 2016/04/06
- [Guile-commits] 13/18: Flush buffered reads / writes before seeking, Andy Wingo, 2016/04/06
- [Guile-commits] 15/18: Cosmetic changes to vports.c, Andy Wingo, 2016/04/06
- [Guile-commits] 01/18: Fix frame->stack-vector when no stack is active, Andy Wingo, 2016/04/06
- [Guile-commits] 07/18: Remove port free functions; just close instead, Andy Wingo, 2016/04/06
- [Guile-commits] 16/18: When making soft port, parse handlers into struct, Andy Wingo, 2016/04/06
- [Guile-commits] 12/18: Whitespace fixes, Andy Wingo, 2016/04/06
- [Guile-commits] 05/18: Move line-buffing machinery to ports.c, Andy Wingo, 2016/04/06