1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

Rehash weak hash tables less frequently.

* libguile/hashtab.c (weak_bucket_assoc): Call `scm_i_rehash' only when
  REMAINING is below `SCM_HASHTABLE_LOWER (table)'.
This commit is contained in:
Ludovic Courtès 2010-12-16 17:07:50 +01:00
parent 3854d5fd23
commit 70249b9857

View file

@ -222,6 +222,7 @@ weak_bucket_assoc (SCM table, SCM buckets, size_t bucket_index,
remaining = SCM_HASHTABLE_N_ITEMS (table) - args.removed_items;
SCM_SET_HASHTABLE_N_ITEMS (table, remaining);
if (remaining < SCM_HASHTABLE_LOWER (table))
scm_i_rehash (table, hash_fn, closure, "weak_bucket_assoc");
}