]> git.eshelyaron.com Git - emacs.git/commit
Fix 'internal_equal' so that it uses at most one hash table
authorEthan Kong <ek.ethan.kong@gmail.com>
Sat, 19 Oct 2024 04:43:27 +0000 (12:43 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Nov 2024 15:48:01 +0000 (16:48 +0100)
commit6ddd90539feed81af4ab49ec8ae60ae51a979b0a
tree6c6b7c208696f015fb4332569efb1fb7fb6c5165
parent545f53d3b96f9b8377c4d8b9513554a7ed128799
Fix 'internal_equal' so that it uses at most one hash table

The old implementation passed the hash table by value in
recursive tests, which would cause each recursive level to
initialize its own hash table, causing excess memory usage.
* src/fns.c (internal_equal): Delegate to 'internal_equal_1'.
(internal_equal_1): New function; body from old 'internal_equal'.
Pass the hash table argument by reference instead of by value.
(Bug#73883)

(cherry picked from commit 200214ca68f00722bf906bbf2a2afa81d139d5dc)
src/fns.c