summaryrefslogtreecommitdiff
path: root/libguile/smob.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-08-20 01:16:38 +0200
committerLudovic Courtès <ludo@gnu.org>2009-08-20 01:16:38 +0200
commit1f7de769402cf8a9ad54b5283dc96d60e86fb5bb (patch)
tree0b3dab575b7b389e8bb6a9de5493c0e89416d7e7 /libguile/smob.c
parentaec3d99bcd1dd4020e56c426909dc570d0109d91 (diff)
downloadguile-1f7de769402cf8a9ad54b5283dc96d60e86fb5bb.tar.gz
Simplify the creation of the SMOB GC "kind".
* libguile/smob.c (smob_freelist): Remove. (scm_smob_prehistory): Adjust accordingly.
Diffstat (limited to 'libguile/smob.c')
-rw-r--r--libguile/smob.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libguile/smob.c b/libguile/smob.c
index 0598bae33..b2c083cd3 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -496,10 +496,8 @@ free_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
/* Marking SMOBs using user-supplied mark procedures. */
-/* The freelist and GC kind used for SMOB types that provide a custom mark
- procedure. */
-static void **smob_freelist = NULL;
-static int smob_gc_kind = 0;
+/* The GC kind used for SMOB types that provide a custom mark procedure. */
+static int smob_gc_kind;
/* The generic SMOB mark procedure that gets called for SMOBs allocated with
@@ -636,8 +634,7 @@ scm_smob_prehistory ()
long i;
scm_t_bits tc;
- smob_freelist = GC_new_free_list ();
- smob_gc_kind = GC_new_kind ((void **)smob_freelist,
+ smob_gc_kind = GC_new_kind (GC_new_free_list (),
GC_MAKE_PROC (GC_new_proc (smob_mark), 0),
0,
/* Clear new objects. As of version 7.1, libgc