summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-02-21 15:31:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-02-21 15:39:17 -0800
commit83c9c6fc1cc943f239a021b42a8ca9b0e162198c (patch)
treeeb0a1840bc941357c4dffac5050776b5e8165cd3 /src/alloc.c
parent5cbdaa98f975c870c4afa24346630a18b55f27ab (diff)
downloademacs-83c9c6fc1cc943f239a021b42a8ca9b0e162198c.tar.gz
emacs-83c9c6fc1cc943f239a021b42a8ca9b0e162198c.tar.bz2
emacs-83c9c6fc1cc943f239a021b42a8ca9b0e162198c.zip
Use float instead of Lisp_Object for rehash_size
* src/alloc.c (purecopy_hash_table): * src/fns.c (maybe_resize_hash_table, Fmake_hash_table): (Fhash_table_rehash_size): * src/lisp.h (struct Lisp_Hash_Table.rehash_size): The rehash_size member of struct Lisp_Hash_Table is now a float, not a Lisp_Object. * src/alloc.c (purecopy_hash_table): Assign members in order. * src/fns.c (make_hash_table): Use EMACS_INT for size and float for rehash_size, instead of Lisp_Object for both. All callers changed. * src/lisp.h (DEFAULT_REHASH_SIZE): Now float, not double, and 1 smaller. * src/print.c (print_object): Simplify by calling Fhash_table_rehash_size and Fhash_table_rehash_threshold. Avoid unnecessary NILP.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 5da4290701e..b44b90e558a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5453,18 +5453,18 @@ purecopy_hash_table (struct Lisp_Hash_Table *table)
pure_test.user_hash_function = purecopy (table->test.user_hash_function);
pure_test.user_cmp_function = purecopy (table->test.user_cmp_function);
- pure->test = pure_test;
pure->header = table->header;
pure->weak = purecopy (Qnil);
- pure->rehash_size = purecopy (table->rehash_size);
pure->hash = purecopy (table->hash);
pure->next = purecopy (table->next);
- pure->next_free = table->next_free;
pure->index = purecopy (table->index);
pure->count = table->count;
+ pure->next_free = table->next_free;
pure->pure = table->pure;
pure->rehash_threshold = table->rehash_threshold;
+ pure->rehash_size = table->rehash_size;
pure->key_and_value = purecopy (table->key_and_value);
+ pure->test = pure_test;
return pure;
}