summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-01-24 08:07:54 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2024-01-24 08:07:54 -0500
commit3018c6e7ba5d35b756aea5eed7f3981548a597b4 (patch)
tree8c88c7f4f30af0401d5cc1458efc284fc780d5ac /src/print.c
parent802821b81ac5ad0dee7f26caa519326251b262c1 (diff)
downloademacs-3018c6e7ba5d35b756aea5eed7f3981548a597b4.tar.gz
(DOHASH): Change calling convention
This leads to simpler code in the users, and more efficient machine code because we don't repeatedly need to fetch the `table_size` and `key_and_value` fields of the hash table object. * src/lisp.h (DOHASH): Rewrite. * src/composite.c (composition_gstring_lookup_cache): Simplify. (composition_gstring_cache_clear_font): * src/print.c (print): * src/pdumper.c (hash_table_contents): * src/minibuf.c (Ftest_completion): * src/json.c (lisp_to_json_nonscalar_1): * src/emacs-module.c (module_global_reference_p): * src/comp.c (compile_function, Fcomp__compile_ctxt_to_file): * src/fns.c (Fmaphash): Adjust to new calling convention.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c
index c99d8d5fe3a..c6a3dba3163 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1285,9 +1285,9 @@ print (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
{ /* Remove unnecessary objects, which appear only once in OBJ;
that is, whose status is Qt. */
struct Lisp_Hash_Table *h = XHASH_TABLE (Vprint_number_table);
- DOHASH (h, i)
- if (EQ (HASH_VALUE (h, i), Qt))
- Fremhash (HASH_KEY (h, i), Vprint_number_table);
+ DOHASH (h, k, v)
+ if (EQ (v, Qt))
+ Fremhash (k, Vprint_number_table);
}
}