summaryrefslogtreecommitdiff
path: root/libguile/array-handle.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-10-12 12:04:34 +0200
committerLudovic Courtès <ludo@gnu.org>2017-10-25 11:39:38 -0700
commit1008ea315483d1fb41b2a8c10680e511238836d0 (patch)
treeed5099f0818e2f810231eceb4a66e626f2332de6 /libguile/array-handle.c
parentbf060d2affbfea8e7b69d160b8214d791661f236 (diff)
downloadguile-1008ea315483d1fb41b2a8c10680e511238836d0.tar.gz
Allow garbage collection of revealed file ports.
Reported at <https://bugs.gnu.org/28784>. Discussed at <https://lists.gnu.org/archive/html/guile-devel/2017-10/msg00003.html>. * libguile/fports.c (revealed_ports, revealed_lock): Remove. (scm_revealed_count): Just return 'SCM_REVEALED (port)'. (scm_set_port_revealed_x, scm_adjust_port_revealed_x): Remove REVEALED_PORTS manipulation. (fport_close): Do nothing when SCM_REVEALED (port) > 0. * libguile/fports.h (scm_t_fport): Adjust comment; make 'revealed' unsigned. * libguile/ports.c (do_close): Call 'close_port' instead of 'scm_close_port'. (scm_close_port): Rename to... (close_port): ... this. Add 'explicit' parameter. Clear 'revealed' field when PORT is a file port and EXPLICIT is true. (scm_close_port): Call 'close_port'. * test-suite/tests/ports.test ("close-port & revealed port") ("revealed port fdes not closed"): New tests.
Diffstat (limited to 'libguile/array-handle.c')
0 files changed, 0 insertions, 0 deletions