* coop.c, iselect.c: Since thread switches are now performed with
[bpt/guile.git] / libguile / strports.c
index d4a5720..4e0ea1a 100644 (file)
@@ -270,10 +270,14 @@ scm_eval_string (string)
   SCM ans = SCM_UNSPECIFIED;
 
   /* Read expressions from that port; ignore the values.  */
-  while ((form = scm_read (port)) != SCM_EOF_VAL)
+  while (!SCM_EOF_OBJECT_P (form = scm_read (port)))
     ans = scm_eval_x (form);
 
-  scm_close_port (port);
+  /* Don't close the port here; if we re-enter this function via a
+     continuation, then the next time we enter it, we'll get an error.
+     It's a string port anyway, so there's no advantage to closing it
+     early.  */
+
   return ans;
 }
 
@@ -300,6 +304,7 @@ scm_ptobfuns scm_stptob =
   stwrite,
   noop0,
   stgetc,
+  scm_generic_fgets,
   0
 };