Removed the now-useless `scm_struct_free_*' functions.
authorLudovic Courtes <ludovic.courtes@laas.fr>
Tue, 30 May 2006 21:57:09 +0000 (21:57 +0000)
committerLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 18:26:47 +0000 (20:26 +0200)
* libguile/struct.c (scm_alloc_struct): Set the `scm_struct_i_free'
  element to 0 instead of `scm_struct_free_standard'.
  (scm_struct_free_0): Removed.
  (scm_struct_free_light): Removed.
  (scm_struct_free_standard): Removed.
  (scm_struct_free_entity): Removed.

* libguile/struct.h (scm_struct_free_0): Removed.
  (scm_struct_free_light): Removed.
  (scm_struct_free_standard): Removed.
  (scm_struct_free_entity): Removed.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-35

libguile/struct.c
libguile/struct.h

index b7a0016..a31ab06 100644 (file)
@@ -306,7 +306,7 @@ scm_alloc_struct (int n_words, int n_extra, const char *what)
   p = (scm_t_bits *) (((scm_t_bits) p + 7) & ~7);
 
   /* Initialize a few fields as described above.  */
-  p[scm_struct_i_free] = (scm_t_bits) scm_struct_free_standard;
+  p[scm_struct_i_free] = (scm_t_bits) 0;
   p[scm_struct_i_ptr] = (scm_t_bits) block;
   p[scm_struct_i_n_words] = n_words;
   p[scm_struct_i_flags] = 0;
@@ -346,36 +346,6 @@ struct_finalizer_trampoline (GC_PTR ptr, GC_PTR unused_data)
 
 
 
-void
-scm_struct_free_0 (scm_t_bits * vtable SCM_UNUSED,
-                  scm_t_bits * data SCM_UNUSED)
-{
-}
-
-void
-scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data)
-{
-  size_t n = vtable [scm_struct_i_size] & ~SCM_STRUCTF_MASK;
-  scm_gc_free (data, n, "struct");
-}
-
-void
-scm_struct_free_standard (scm_t_bits * vtable SCM_UNUSED, scm_t_bits * data)
-{
-  size_t n = (data[scm_struct_i_n_words] + scm_struct_n_extra_words)
-            * sizeof (scm_t_bits) + 7;
-  scm_gc_free ((void *) data[scm_struct_i_ptr], n, "heavy struct");
-}
-
-void
-scm_struct_free_entity (scm_t_bits * vtable SCM_UNUSED, scm_t_bits * data)
-{
-  size_t n = (data[scm_struct_i_n_words] + scm_struct_entity_n_extra_words)
-            * sizeof (scm_t_bits) + 7;
-  scm_gc_free ((void *) data[scm_struct_i_ptr], n, "entity struct");
-}
-
-
 \f
 SCM_DEFINE (scm_make_struct, "make-struct", 2, 0, 1, 
             (SCM vtable, SCM tail_array_size, SCM init),
index 04f5e3e..515e059 100644 (file)
@@ -84,10 +84,6 @@ SCM_API SCM scm_struct_table;
 
 SCM_API scm_t_bits * scm_alloc_struct (int n_words, int n_extra,
                                       const char *what);
-SCM_API void scm_struct_free_0 (scm_t_bits * vtable, scm_t_bits * data);
-SCM_API void scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data);
-SCM_API void scm_struct_free_standard (scm_t_bits * vtable, scm_t_bits * data);
-SCM_API void scm_struct_free_entity (scm_t_bits * vtable, scm_t_bits * data);
 SCM_API SCM scm_make_struct_layout (SCM fields);
 SCM_API SCM scm_struct_p (SCM x);
 SCM_API SCM scm_struct_vtable_p (SCM x);