* goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
[bpt/guile.git] / libguile / continuations.c
index cd89110..c44465b 100644 (file)
@@ -94,11 +94,11 @@ continuation_free (SCM obj)
     + extra_items * sizeof (SCM_STACKITEM);
 
 #ifdef __ia64__
-  bytes_free += continuation->backing_store_size;
-  scm_must_free (continuation->backing_store);
+  scm_gc_free (continuation->backing_store, continuation->backing_store_size,
+              "continuation backing store");
 #endif /* __ia64__ */ 
-  scm_must_free (continuation);
-  return bytes_free;
+  scm_gc_free (continuation, bytes_free, "continuation");
+  return 0;
 }
 
 static int
@@ -146,9 +146,9 @@ scm_make_continuation (int *first)
   SCM_ENTER_A_SECTION;
   SCM_FLUSH_REGISTER_WINDOWS;
   stack_size = scm_stack_size (rootcont->base);
-  continuation = scm_must_malloc (sizeof (scm_t_contregs)
-                                 + (stack_size - 1) * sizeof (SCM_STACKITEM),
-                                 FUNC_NAME);
+  continuation = scm_gc_malloc (sizeof (scm_t_contregs)
+                               + (stack_size - 1) * sizeof (SCM_STACKITEM),
+                               "continuation");
   continuation->num_stack_items = stack_size;
   continuation->dynenv = scm_dynwinds;
   continuation->throw_value = SCM_EOL;
@@ -174,7 +174,8 @@ scm_make_continuation (int *first)
         (unsigned long) __libc_ia64_register_backing_store_base;
       continuation->backing_store = NULL;
       continuation->backing_store = 
-        scm_must_malloc (continuation->backing_store_size, FUNC_NAME);
+        scm_gc_malloc (continuation->backing_store_size,
+                      "continuation backing store");
       memcpy (continuation->backing_store, 
               (void *) __libc_ia64_register_backing_store_base, 
               continuation->backing_store_size);
@@ -269,7 +270,7 @@ scm_dynthrow (SCM cont, SCM val)
     grow_stack (cont, val);
 #else
   dst -= continuation->num_stack_items;
-  if (SCM_PTR_LE (dst, &stack_top_element))
+  if (dst <= &stack_top_element)
     grow_stack (cont, val);
 #endif /* def SCM_STACK_GROWS_UP */
 
@@ -311,9 +312,7 @@ scm_init_continuations ()
   scm_set_smob_free (scm_tc16_continuation, continuation_free);
   scm_set_smob_print (scm_tc16_continuation, continuation_print);
   scm_set_smob_apply (scm_tc16_continuation, continuation_apply, 0, 0, 1);
-#ifndef SCM_MAGIC_SNARFER
 #include "libguile/continuations.x"
-#endif
 }
 
 /*