summaryrefslogtreecommitdiff
path: root/src/emacs-module.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/emacs-module.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/emacs-module.c')
-rw-r--r--src/emacs-module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 77dd2b9152c..08db39b0b0d 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -410,8 +410,8 @@ module_global_reference_p (emacs_value v, ptrdiff_t *n)
struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash);
/* Note that we can't use `hash_lookup' because V might be a local
reference that's identical to some global reference. */
- DOHASH (h, i)
- if (&XMODULE_GLOBAL_REFERENCE (HASH_VALUE (h, i))->value == v)
+ DOHASH (h, k, val)
+ if (&XMODULE_GLOBAL_REFERENCE (val)->value == v)
return true;
/* Only used for debugging, so we don't care about overflow, just
make sure the operation is defined. */