Add C macro for hash table iteration
authorMattias Engdegård <mattiase@acm.org>
Fri, 19 Jan 2024 14:17:52 +0000 (15:17 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sun, 21 Jan 2024 10:21:51 +0000 (11:21 +0100)
commitfec87a4b36a67688932e7bb7e1720bd2c4363a61
tree8549ad5b17f75ba86a77e5fd8dea8a77bb3133af
parent0a07603ae8db41f69e83b1bfec6e28a92f737852
Add C macro for hash table iteration

This removes some boilerplate code and further reduces dependencies on
hash table implementation internals.

* src/lisp.h (DOHASH): New.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftest_completion):
* src/print.c (print):
Use it instead of a hand-written loop.
src/comp.c
src/composite.c
src/emacs-module.c
src/fns.c
src/json.c
src/lisp.h
src/minibuf.c
src/print.c