Don't mark closed custom binary ports.
authorLudovic Courtès <ludo@gnu.org>
Sun, 21 Jun 2009 14:05:27 +0000 (21 16:05 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 21 Jun 2009 14:05:27 +0000 (21 16:05 +0200)
Patch from Guile `master' by Andy/Mike.

src/ports.c

index c37dcea..079d50a 100644 (file)
@@ -225,7 +225,10 @@ static SCM
 cbp_mark (SCM port)
 {
   /* Mark the underlying method and object vector.  */
-  return (SCM_PACK (SCM_STREAM (port)));
+  if (SCM_OPENP (port))
+    return SCM_PACK (SCM_STREAM (port));
+  else
+    return SCM_BOOL_F;
 }
 
 static off_t