diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1997-12-04 16:18:59 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1997-12-04 16:18:59 +0000 |
commit | bfc471e7a141068a23f91262a36c77695536c8bd (patch) | |
tree | 597b79b8d9068a7ea3fe3bf1f9e920f48ade029c /libguile/print.h | |
parent | 380463881aa6de9cbbdb9a7c82da8818b76547c2 (diff) | |
download | guile-bfc471e7a141068a23f91262a36c77695536c8bd.tar.gz |
* print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
before taking the CDR.
Diffstat (limited to 'libguile/print.h')
-rw-r--r-- | libguile/print.h | 4 |
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) |