diff options
| author | Mattias EngdegÄrd | 2023-10-29 12:27:04 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-01-12 18:02:15 +0100 |
| commit | 462b3e6ae4eefeb65a2dc7b144db3e1af9a7720d (patch) | |
| tree | 57c5f0aa6c081602b517bd0c7f987277fe8fa063 /src/composite.c | |
| parent | 0bc13945acb8d18bc18b5abc5c5cf9adebc46ca6 (diff) | |
| download | emacs-462b3e6ae4eefeb65a2dc7b144db3e1af9a7720d.tar.gz emacs-462b3e6ae4eefeb65a2dc7b144db3e1af9a7720d.zip | |
Refactor: extract hash and index computations to functions
* src/lisp.h (hash_from_key):
* src/fns.c (hash_index_index): New.
(hash_table_rehash, hash_lookup, hash_remove_from_table):
(maybe_resize_hash_table, hash_put):
* src/composite.c (composition_gstring_put_cache): Use them.
Diffstat (limited to 'src/composite.c')
| -rw-r--r-- | src/composite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/composite.c b/src/composite.c index 91836fa2a8f..7c7f4720514 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -653,7 +653,7 @@ composition_gstring_put_cache (Lisp_Object gstring, ptrdiff_t len) | |||
| 653 | { | 653 | { |
| 654 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); | 654 | struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table); |
| 655 | Lisp_Object header = LGSTRING_HEADER (gstring); | 655 | Lisp_Object header = LGSTRING_HEADER (gstring); |
| 656 | Lisp_Object hash = h->test.hashfn (header, h); | 656 | Lisp_Object hash = hash_from_key (h, header); |
| 657 | if (len < 0) | 657 | if (len < 0) |
| 658 | { | 658 | { |
| 659 | ptrdiff_t glyph_len = LGSTRING_GLYPH_LEN (gstring); | 659 | ptrdiff_t glyph_len = LGSTRING_GLYPH_LEN (gstring); |