]> git.eshelyaron.com Git - emacs.git/commit
Fix clrhash bug when hash table needs rehashing
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Aug 2019 01:54:08 +0000 (18:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 Aug 2019 02:01:49 +0000 (19:01 -0700)
commitceebf3efbea7faffc01558d88c91250539c737e0
tree3f8d585e220804bd18b493f696691ed7e91fad9f
parentc64c0230d65260f44f367bac72bfdee50c52a90d
Fix clrhash bug when hash table needs rehashing

Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/fns.c (maybe_resize_hash_table): Prefer ASET to gc_aset
where either will do.  Simplify appending of Qunbound values.
Put index_size calculation closer to where it’s needed.
(hash_clear): If hash_rehash_needed_p (h), don’t clear the
nonexistent hash vector.  Use memclear to speed up clearing.
* src/lisp.h (HASH_TABLE_SIZE): Check that the size is positive,
and tell that to the compiler.
src/fns.c
src/lisp.h