1
Fork 0
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:
Jim Blandy 1997-12-03 17:30:24 +00:00
parent a1a4b8ed86
commit 3c1750f377

View file

@ -418,7 +418,8 @@ scm_close_port (port)
port = SCM_COERCE_OUTPORT (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)) if (SCM_CLOSEDP (port))
return SCM_BOOL_F; return SCM_BOOL_F;
i = SCM_PTOBNUM (port); i = SCM_PTOBNUM (port);