aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPaul Eggert2019-07-20 19:40:03 -0700
committerPaul Eggert2019-07-20 20:13:46 -0700
commitb6f194a0fb6dbd1b19aa01f95a955f5b8b23b40e (patch)
tree009e3beff4781c98e733657d60003b3eee97e068 /src/image.c
parent5018b663c6c0d31f27fb44630a69d9e0bd73273d (diff)
downloademacs-b6f194a0fb6dbd1b19aa01f95a955f5b8b23b40e.tar.gz
emacs-b6f194a0fb6dbd1b19aa01f95a955f5b8b23b40e.zip
Simplify hashfn/cmpfn calling convention
* src/fns.c (cmpfn_eql, cmpfn_equal, cmpfn_user_defined) (hashfn_eq, hashfn_equal, hashfn_eql, hashfn_user_defined): * src/profiler.c (cmpfn_profiler, hashfn_profiler): Use new calling convention where the return value is a fixnum instead of EMACS_UINT. While we’re at it, put the hash table at the end, since that’s a bit simpler and generates better code (at least on the x86-64). All callers changed. * src/fns.c (hash_lookup): Store fixnum rather than EMACS_UINT. All callers changed. (hash_put): Take a fixnum rather than an EMACS_UINT. All callers changed. Remove unnecessary eassert (XUFIXNUM does it). * src/lisp.h (struct hash_table_test): Adjust signatures of cmpfn and hashfn.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c
index b081d4b9123..355c849491a 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4606,8 +4606,7 @@ xpm_put_color_table_h (Lisp_Object color_table,
4606 Lisp_Object color) 4606 Lisp_Object color)
4607{ 4607{
4608 struct Lisp_Hash_Table *table = XHASH_TABLE (color_table); 4608 struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
4609 EMACS_UINT hash_code; 4609 Lisp_Object chars = make_unibyte_string (chars_start, chars_len), hash_code;
4610 Lisp_Object chars = make_unibyte_string (chars_start, chars_len);
4611 4610
4612 hash_lookup (table, chars, &hash_code); 4611 hash_lookup (table, chars, &hash_code);
4613 hash_put (table, chars, color, hash_code); 4612 hash_put (table, chars, color, hash_code);