Implemented rehashing of weak hash tables.
authorLudovic Courtes <ludovic.courtes@laas.fr>
Tue, 13 Jun 2006 20:17:32 +0000 (20:17 +0000)
committerLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 18:27:20 +0000 (20:27 +0200)
commitc6a35e35f76e800bd85cb28e6ace743aedd87e61
tree1aa538e23b2b8092c46173a91b160b784ce17046
parent651a0735225da3e4887df018824e9baaada5194e
Implemented rehashing of weak hash tables.

* libguile/hashtab.c (weak_hashtables): Removed.
  (SCM_WEAK_CELL_DELETED_P): New macro.
  (START_WEAK_BUCKET_FIXUP): Added the HASHFN argument.  Invoke
  `scm_i_rehash ()' when pairs have been removed.
  (END_WEAK_BUCKET_FIXUP): Added the HASHFN argument.
  (make_hash_table): Use `SCM_NEWSMOB2 ()' instead of `SCM_NEWSMOB3 ()'
  -- last argument used to be WEAK_HASHTABLES.
  (scm_i_rehash): Handle weak hash tables.
  (to_rehash): Removed.
  (scm_internal_hash_fold): Use `SCM_WEAK_CELL_DELETED_P ()' rather than
  hand-written equivalent code.
  (rehash_after_gc): Removed.
  (scm_hashtab_prehistory): Don't add it as an after-gc hook.

* libguile/hashtab.h (SCM_HASHTABLE_NEXT): Removed.
  (SCM_HASHTABLE_NEXTLOC): Removed.
  (SCM_SET_HASHTABLE_NEXT): Removed.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-38
libguile/hashtab.c
libguile/hashtab.h