mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
* ports.c (scm_close_port): Make sure the port is open before
trying to close it.
This commit is contained in:
parent
a1a4b8ed86
commit
3c1750f377
1 changed files with 2 additions and 1 deletions
|
@ -418,7 +418,8 @@ scm_close_port (port)
|
|||
|
||||
port = SCM_COERCE_OUTPORT (port);
|
||||
|
||||
SCM_ASSERT (SCM_NIMP (port) && SCM_PORTP (port), port, SCM_ARG1, s_close_port);
|
||||
SCM_ASSERT (SCM_NIMP (port) && SCM_OPPORTP (port), port, SCM_ARG1,
|
||||
s_close_port);
|
||||
if (SCM_CLOSEDP (port))
|
||||
return SCM_BOOL_F;
|
||||
i = SCM_PTOBNUM (port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue