aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2017-02-21 15:31:29 -0800
committerPaul Eggert2017-02-21 15:39:17 -0800
commit83c9c6fc1cc943f239a021b42a8ca9b0e162198c (patch)
treeeb0a1840bc941357c4dffac5050776b5e8165cd3 /src/alloc.c
parent5cbdaa98f975c870c4afa24346630a18b55f27ab (diff)
downloademacs-83c9c6fc1cc943f239a021b42a8ca9b0e162198c.tar.gz
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)
5453 pure_test.user_hash_function = purecopy (table->test.user_hash_function); 5453 pure_test.user_hash_function = purecopy (table->test.user_hash_function);
5454 pure_test.user_cmp_function = purecopy (table->test.user_cmp_function); 5454 pure_test.user_cmp_function = purecopy (table->test.user_cmp_function);
5455 5455
5456 pure->test = pure_test;
5457 pure->header = table->header; 5456 pure->header = table->header;
5458 pure->weak = purecopy (Qnil); 5457 pure->weak = purecopy (Qnil);
5459 pure->rehash_size = purecopy (table->rehash_size);
5460 pure->hash = purecopy (table->hash); 5458 pure->hash = purecopy (table->hash);
5461 pure->next = purecopy (table->next); 5459 pure->next = purecopy (table->next);
5462 pure->next_free = table->next_free;
5463 pure->index = purecopy (table->index); 5460 pure->index = purecopy (table->index);
5464 pure->count = table->count; 5461 pure->count = table->count;
5462 pure->next_free = table->next_free;
5465 pure->pure = table->pure; 5463 pure->pure = table->pure;
5466 pure->rehash_threshold = table->rehash_threshold; 5464 pure->rehash_threshold = table->rehash_threshold;
5465 pure->rehash_size = table->rehash_size;
5467 pure->key_and_value = purecopy (table->key_and_value); 5466 pure->key_and_value = purecopy (table->key_and_value);
5467 pure->test = pure_test;
5468 5468
5469 return pure; 5469 return pure;
5470} 5470}