aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorStefan Monnier2024-01-24 08:16:11 -0500
committerStefan Monnier2024-01-24 08:16:41 -0500
commitcc861fc528b49fc459bb9a1e5054f5fd82e1b689 (patch)
tree40f6b9e42f1d3cc9c9396051b3f84bfefb993ae3 /src/alloc.c
parent3018c6e7ba5d35b756aea5eed7f3981548a597b4 (diff)
downloademacs-cc861fc528b49fc459bb9a1e5054f5fd82e1b689.tar.gz
emacs-cc861fc528b49fc459bb9a1e5054f5fd82e1b689.zip
(struct composition): Remove dependency on hash-table internals
`struct composition` kept an index into the internal `key_and_value` array of hash tables, which only worked because of details of how hash-tables are handled. Replace it with a reference to the key stored at that location in the hash-table, which saves us an indirection while at it. * src/composite.h (struct composition): Replace `hash_index` with the actual `key`. (COMPOSITION_KEY): Simplify accordingly. (mark_composite): Declare. * src/composite.c (get_composition_id): Adjust accordingly. (mark_composite): New function. * src/charset.c (mark_charset): Uncomment. * src/lisp.h (mark_charset): Declare. * src/alloc.c (garbage_collect): Call `mark_charset` and `mark_composite`. * src/pdumper.c (hash_table_contents): Remove invalid comment, since compositions aren't dumped.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 2a1690d2cff..ab31d21fb33 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6594,6 +6594,8 @@ garbage_collect (void)
6594 mark_terminals (); 6594 mark_terminals ();
6595 mark_kboards (); 6595 mark_kboards ();
6596 mark_threads (); 6596 mark_threads ();
6597 mark_charset ();
6598 mark_composite ();
6597 mark_profiler (); 6599 mark_profiler ();
6598#ifdef HAVE_PGTK 6600#ifdef HAVE_PGTK
6599 mark_pgtkterm (); 6601 mark_pgtkterm ();