From: Andrea Corallo Date: Fri, 1 Jan 2021 11:27:39 +0000 (+0100) Subject: * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration. X-Git-Tag: emacs-28.0.90~2727^2~189 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ba94f7c77b4013e15f8a5a9181fba9a2df20ab7;p=emacs.git * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration. --- diff --git a/src/comp.c b/src/comp.c index da4361030b1..2670c917ed6 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4413,12 +4413,14 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, struct Lisp_Hash_Table *func_h = XHASH_TABLE (CALL1I (comp-ctxt-funcs-h, Vcomp_ctxt)); - for (ptrdiff_t i = 0; i < func_h->count; i++) - declare_function (HASH_VALUE (func_h, i)); + for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (func_h); i++) + if (!EQ (HASH_VALUE (func_h, i), Qunbound)) + declare_function (HASH_VALUE (func_h, i)); /* Compile all functions. Can't be done before because the relocation structs has to be already defined. */ - for (ptrdiff_t i = 0; i < func_h->count; i++) - compile_function (HASH_VALUE (func_h, i)); + for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (func_h); i++) + if (!EQ (HASH_VALUE (func_h, i), Qunbound)) + compile_function (HASH_VALUE (func_h, i)); add_driver_options ();