diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2023-12-28 19:04:43 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2024-01-12 18:03:02 +0100 |
commit | 29e3d1c56f07a53d1955c9a71e68f70f3b901728 (patch) | |
tree | 8af3a2032f9e99368dd2a4ac14bacc26be23d9ea /src/json.c | |
parent | 484e04efa4fcb81968cba8e05835812c62856287 (diff) | |
download | emacs-29e3d1c56f07a53d1955c9a71e68f70f3b901728.tar.gz emacs-29e3d1c56f07a53d1955c9a71e68f70f3b901728.tar.bz2 emacs-29e3d1c56f07a53d1955c9a71e68f70f3b901728.zip |
Abstract predicate and constant for unused hash keys
Qunbound is used for many things; using a predicate and constant for
the specific purpose of unused hash entry keys allows us to locate
them and make changes much more easily.
* src/lisp.h (HASH_UNUSED_ENTRY_KEY, hash_unused_entry_key_p):
New constant and function.
* 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 (make_hash_table, maybe_resize_hash_table, hash_put)
(hash_remove_from_table, hash_clear, sweep_weak_table, Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/print.c (print, print_object):
Use them.
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c index af5f30c7275..d98b312ecc9 100644 --- a/src/json.c +++ b/src/json.c @@ -364,7 +364,7 @@ lisp_to_json_nonscalar_1 (Lisp_Object lisp, for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (h); ++i) { Lisp_Object key = HASH_KEY (h, i); - if (!BASE_EQ (key, Qunbound)) + if (!hash_unused_entry_key_p (key)) { CHECK_STRING (key); Lisp_Object ekey = json_encode (key); |