summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2012-10-23 00:36:12 -0400
committerMark H Weaver <mhw@netris.org>2012-10-23 22:44:55 -0400
commit851c3cd16e6b9caee069581aa34e198d1df14c71 (patch)
treed4c139b3780e6888efaea73fab1a5a4883ceada1
parent02327c0c5159809e204a561c2e12b84cbb8f0c20 (diff)
downloadguile-851c3cd16e6b9caee069581aa34e198d1df14c71.tar.gz
Repurpose scm_i_port_weak_hash to associate an alist with each port.
* libguile/ports.c (scm_i_port_weak_hash): Document that the values in this hash table will now be alists. Previously the value slots were unused. (scm_new_port_table_entry): Change the initial value of the entry in scm_i_port_weak_hash from SCM_BOOL_F to SCM_EOL.
-rw-r--r--libguile/ports.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/ports.c b/libguile/ports.c
index 301bc448b..55808e272 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -533,7 +533,8 @@ scm_i_dynwind_current_load_port (SCM port)
/*
We need a global registry of ports to flush them all at exit, and to
- get all the ports matching a file descriptor.
+ get all the ports matching a file descriptor. The associated values
+ are alists, where additional information can be associated with ports.
*/
SCM scm_i_port_weak_hash;
@@ -633,7 +634,7 @@ scm_new_port_table_entry (scm_t_bits tag)
SCM_SET_CELL_TYPE (z, tag);
SCM_SETPTAB_ENTRY (z, entry);
- scm_hashq_set_x (scm_i_port_weak_hash, z, SCM_BOOL_F);
+ scm_hashq_set_x (scm_i_port_weak_hash, z, SCM_EOL);
/* For each new port, register a finalizer so that it port type's free
function can be invoked eventually. */