(scm_make_continuation): Do not retain the throw_value when the
authorMarius Vollmer <mvo@zagadka.de>
Sun, 16 Dec 2001 21:58:02 +0000 (21:58 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Sun, 16 Dec 2001 21:58:02 +0000 (21:58 +0000)
continuation is invoked.

libguile/continuations.c

index 769bbfc..cd89110 100644 (file)
@@ -183,14 +183,18 @@ scm_make_continuation (int *first)
     }
   else
     {
+      SCM ret = continuation->throw_value;
       *first = 0;
-      return continuation->throw_value;
+      continuation->throw_value = SCM_BOOL_F;
+      return ret;
     }
 #else /* !__ia64__ */
   if (setjmp (continuation->jmpbuf))
     {
+      SCM ret = continuation->throw_value;
       *first = 0;
-      return continuation->throw_value;
+      continuation->throw_value = SCM_BOOL_F;
+      return ret;
     }
   else
     {