]> git.eshelyaron.com Git - emacs.git/commit
Fix hash table overallocation etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Jul 2019 02:40:02 +0000 (19:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Jul 2019 03:13:45 +0000 (20:13 -0700)
commitb0908a0fe6dc4f878b05a8b26ed3ff0c702e26c7
tree400ba7b7232f1dbb931f890a2e39de9cd903c181
parent6490269becdad96ca4b3b9db0d96dbb04ef2ab6a
Fix hash table overallocation etc.

* src/fns.c (set_hash_key_and_value, set_hash_next)
(set_hash_hash, set_hash_index): Remove.  All uses removed.
(maybe_resize_hash_table): Don’t update h->next until it’s
known that all the allocations succeeded, to avoid trashing
the hash table if memory is exhausted.  Don’t overallocate the
other vectors.  Don’t output growth message if the hash table
didn’t actually grow due to allocation failure.  Assume C99
decls after statements.
src/fns.c