From 6bb2c00a76732b399ff000779cbbc8f95d511c4e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 13 May 2011 13:21:51 +0200 Subject: [PATCH] weak_bucket_assoc tweak * libguile/hashtab.c (weak_bucket_assoc): Change assertion to be a check and abort, and so that only calls GC_is_visible if the check fails. --- libguile/hashtab.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 61d744a9d..d70799380 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -211,8 +211,10 @@ weak_bucket_assoc (SCM table, SCM buckets, size_t bucket_index, SCM_SIMPLE_VECTOR_SET (buckets, bucket_index, bucket); result = assoc (object, bucket, closure); - assert (!scm_is_pair (result) || - !SCM_WEAK_PAIR_DELETED_P (GC_is_visible (result))); + + /* If we got a result, it should not have NULL fields. */ + if (scm_is_pair (result) && SCM_WEAK_PAIR_DELETED_P (result)) + abort (); scm_remember_upto_here_1 (strong_refs);