summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-10-31 21:55:55 +0100
committerLudovic Courtès <ludo@gnu.org>2008-10-31 21:55:55 +0100
commit627796347f04312b69a869e62dc3ce69f785da55 (patch)
tree9a3db25c7584df3ae5b980b5115c27584e1d614c
parent47b6e9bd8ea4c19404a990688c57f76d27f7768d (diff)
downloadguile-627796347f04312b69a869e62dc3ce69f785da55.tar.gz
Fix initialization of the SMOB GC "kind".
* libguile/smob.c (scm_smob_prehistory): When initializing SMOB_GC_KIND, pass 1 as the CLEAR_NEW_OBJECTS argument to `GC_new_kind ()'. Without this, an assertion failure is triggered in libgc's `reclaim.c'.
-rw-r--r--libguile/smob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/smob.c b/libguile/smob.c
index eec0e3e1a..0ad4a35ca 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -637,7 +637,10 @@ scm_smob_prehistory ()
smob_freelist = GC_new_free_list ();
smob_gc_kind = GC_new_kind ((void **)smob_freelist,
GC_MAKE_PROC (GC_new_proc (smob_mark), 0),
- 0, 0);
+ 0,
+ /* Clear new objects. As of version 7.1, libgc
+ doesn't seem to support passing 0 here. */
+ 1);
scm_numsmob = 0;
for (i = 0; i < MAX_SMOB_COUNT; ++i)