mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
* ports.c (scm_output_port_p): Bugfix: Coerce output port before
testing (otherwise the port-print-state trick won't be transparent to the user; one example where this caused problems was in the (ice-9 format) module).
This commit is contained in:
parent
55d5475044
commit
4a94d8ca0b
1 changed files with 4 additions and 2 deletions
|
@ -621,7 +621,7 @@ scm_input_port_p (x)
|
|||
SCM x;
|
||||
{
|
||||
if (SCM_IMP (x))
|
||||
return SCM_BOOL_F;
|
||||
return SCM_BOOL_F;
|
||||
return SCM_INPORTP (x) ? SCM_BOOL_T : SCM_BOOL_F;
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,9 @@ scm_output_port_p (x)
|
|||
SCM x;
|
||||
{
|
||||
if (SCM_IMP (x))
|
||||
return SCM_BOOL_F;
|
||||
return SCM_BOOL_F;
|
||||
if (SCM_PORT_WITH_PS_P (x))
|
||||
x = SCM_PORT_WITH_PS_PORT (x);
|
||||
return SCM_OUTPORTP (x) ? SCM_BOOL_T : SCM_BOOL_F;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue