summaryrefslogtreecommitdiff
path: root/libguile/print.h
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/print.h')
-rw-r--r--libguile/print.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/print.h b/libguile/print.h
index b686ed8bd..99de7f5e7 100644
--- a/libguile/print.h
+++ b/libguile/print.h
@@ -70,7 +70,9 @@ extern scm_option scm_print_opts[];
#define SCM_WRITINGP(pstate) ((pstate)->writingp)
#define SCM_SET_WRITINGP(pstate, x) { (pstate)->writingp = (x); }
-#define SCM_COERCE_OUTPORT(p) ((SCM_NIMP (p) && SCM_PRINT_STATE_P (SCM_CDR (p))) \
+#define SCM_COERCE_OUTPORT(p) ((SCM_NIMP (p) \
+ && SCM_CONSP (p) \
+ && SCM_PRINT_STATE_P (SCM_CDR (p))) \
? SCM_CAR (p) \
: p)