aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-10-26 17:17:01 +0200
committerMattias EngdegÄrd2024-01-13 20:50:37 +0100
commitc3d0cc50faf588479db62e20ceabe044dd89e244 (patch)
tree32333d6369a1cddf1799a00ba46bd22d26d473af /src/image.c
parentc6bdc1ea1dc7f9a0b6d92d443f34c42affde73d1 (diff)
downloademacs-c3d0cc50faf588479db62e20ceabe044dd89e244.tar.gz
emacs-c3d0cc50faf588479db62e20ceabe044dd89e244.zip
Remove rehash-threshold and rehash-size struct members
These parameters have no visible semantics and are hardly ever used, so just use the default values for all hash tables. This saves memory, shrinks the external representation, and will improve performance. * src/fns.c (std_rehash_size, std_rehash_threshold): New. (hash_index_size): Use std_rehash_threshold. Remove table argument. All callers updated. (make_hash_table): Remove rehash_size and rehash_threshold args. All callers updated. (maybe_resize_hash_table) (Fhash_table_rehash_size, Fhash_table_rehash_threshold): Use std_rehash_size and std_rehash_threshold. (Fmake_hash_table): Ignore :rehash-size and :rehash-threshold args. * src/lisp.h (struct Lisp_Hash_Table): Remove rehash_size and rehash_threshold fields. (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE): Remove. * src/lread.c (hash_table_from_plist): Don't read rehash-size or rehash-threshold. (syms_of_lread): Remove unused symbols. * src/print.c (print_object): Don't print rehash-size or rehash-threshold. * src/pdumper.c (dump_hash_table): Don't dump removed fields.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/image.c b/src/image.c
index 92e1e0b0be7..9c100213590 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6069,9 +6069,7 @@ xpm_make_color_table_h (void (**put_func) (Lisp_Object, const char *, int,
6069{ 6069{
6070 *put_func = xpm_put_color_table_h; 6070 *put_func = xpm_put_color_table_h;
6071 *get_func = xpm_get_color_table_h; 6071 *get_func = xpm_get_color_table_h;
6072 return make_hash_table (hashtest_equal, DEFAULT_HASH_SIZE, 6072 return make_hash_table (hashtest_equal, DEFAULT_HASH_SIZE, Weak_None, false);
6073 DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD,
6074 Weak_None, false);
6075} 6073}
6076 6074
6077static void 6075static void