summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-12-06 13:50:05 +0100
committerAndy Wingo <wingo@pobox.com>2011-12-06 18:01:45 +0100
commit92c0ebac90439a90b7acc33f3c44f5adf470d8c9 (patch)
treeef2750edb63da0f6df7622f3c94c8e595f1b7f06 /libguile/print.c
parentea0582c283c29e40f1eb1e85821a9c46bc386121 (diff)
downloadguile-92c0ebac90439a90b7acc33f3c44f5adf470d8c9.tar.gz
port locking refactor
* libguile/ports.h (struct scm_t_port): Make the lock into a pointer field instead of an inline field. It should be possible to make unlocked ports by having a NULL lock field. (scm_c_lock_port, scm_c_try_lock_port): Return the mutex if the port was actually locked. (scm_c_unlock_port): Remove. * libguile/ports.c (scm_c_make_port_with_encoding): For now, leave `lock' set to 0. Change scm_c_lock_port callers to pay attention to the new API. * libguile/print.c (scm_write, scm_display): Fix call to dynwind-lock-port for ports-with-print-states.
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 030ea6908..cdb923793 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -1295,7 +1295,7 @@ scm_write (SCM obj, SCM port)
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_write);
scm_dynwind_begin (0);
- scm_dynwind_lock_port (port);
+ scm_dynwind_lock_port (SCM_COERCE_OUTPORT (port));
scm_prin1 (obj, port, 1);
scm_dynwind_end ();
@@ -1314,7 +1314,7 @@ scm_display (SCM obj, SCM port)
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_display);
scm_dynwind_begin (0);
- scm_dynwind_lock_port (port);
+ scm_dynwind_lock_port (SCM_COERCE_OUTPORT (port));
scm_prin1 (obj, port, 0);
scm_dynwind_end ();