summaryrefslogtreecommitdiff
path: root/libguile/weak-set.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-24 00:33:49 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-24 11:47:36 +0100
commit3dc9f41900a0e9f915da3aa1eea6e0fae829c40d (patch)
tree341f211c17227f4484ecf033b20ce2f7d49b40df /libguile/weak-set.c
parent686022e84ee374c3193967b69504f01c030f4c7e (diff)
support for new GC_move_disappearing_link
* configure.ac: Check for GC_move_disappearing_link. * libguile/weak-set.c (move_weak_entry): * libguile/weak-table.c (move_disappearing_links): (move_weak_entry): Use GC_move_disappearing_link if available.
Diffstat (limited to 'libguile/weak-set.c')
-rw-r--r--libguile/weak-set.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/weak-set.c b/libguile/weak-set.c
index 53d22a3da..57e9e5001 100644
--- a/libguile/weak-set.c
+++ b/libguile/weak-set.c
@@ -173,9 +173,13 @@ move_weak_entry (scm_t_weak_entry *from, scm_t_weak_entry *to)
if (copy.key && SCM_HEAP_OBJECT_P (SCM_PACK (copy.key)))
{
+#ifdef HAVE_GC_MOVE_DISAPPEARING_LINK
+ GC_move_disappearing_link ((GC_PTR) &from->key, (GC_PTR) &to->key);
+#else
GC_unregister_disappearing_link ((GC_PTR) &from->key);
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) &to->key,
(GC_PTR) to->key);
+#endif
}
}
else