mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 14:50:19 +02:00
* print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
before taking the CDR.
This commit is contained in:
parent
380463881a
commit
bfc471e7a1
2 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||||
|
|
||||||
|
* print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
|
||||||
|
before taking the CDR.
|
||||||
|
|
||||||
* filesys.c (scm_stat): Coerce output port only if argument *is*
|
* filesys.c (scm_stat): Coerce output port only if argument *is*
|
||||||
an output port! (Thanks to Harald Meland.)
|
an output port! (Thanks to Harald Meland.)
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,9 @@ extern scm_option scm_print_opts[];
|
||||||
#define SCM_WRITINGP(pstate) ((pstate)->writingp)
|
#define SCM_WRITINGP(pstate) ((pstate)->writingp)
|
||||||
#define SCM_SET_WRITINGP(pstate, x) { (pstate)->writingp = (x); }
|
#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) \
|
? SCM_CAR (p) \
|
||||||
: p)
|
: p)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue