1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

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.
This commit is contained in:
Andy Wingo 2011-05-13 13:21:51 +02:00
parent 0b0ac740fc
commit 6bb2c00a76

View file

@ -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);