summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-13 13:21:51 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-13 15:31:02 +0200
commit6bb2c00a76732b399ff000779cbbc8f95d511c4e (patch)
tree9544898d02480d2154ff0be6a8b40fa84d9490ac
parent0b0ac740fcef9644c3808c1d96f440a44a2fbea2 (diff)
downloadguile-6bb2c00a76732b399ff000779cbbc8f95d511c4e.tar.gz
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.
-rw-r--r--libguile/hashtab.c6
1 files 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);