summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2019-07-26 14:59:15 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-07-26 15:03:03 -0400
commit0dc5a85a1c3772a6e78f077719d82f437f626b1e (patch)
treeabe77c1082f55453027d08937302a3e122069be7 /src/lisp.h
parentc74da403aa95ec67598c41aa4f1b97975391135b (diff)
downloademacs-0dc5a85a1c3772a6e78f077719d82f437f626b1e.tar.gz
Don't dump the `hash` vector if it will need to be recomputed anyway
* src/fns.c (hash_table_rehash): Only set `hash` field at the end. (sweep_weak_table): Only set slot of `hash` vector when that vector exists. (Fhash_table_count): No need to hash_rehash_if_needed any more. * src/lisp.h (hash_rehash_needed_p): Test the presence of `hash` instead. * src/pdumper.c (check_hash_table_rehash, dump_hash_table): Set `hash` to nil to indicate that the table needs to be rehashed.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 680798621ca..f437609fe1f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2388,7 +2388,7 @@ void hash_table_rehash (struct Lisp_Hash_Table *h);
INLINE bool
hash_rehash_needed_p (const struct Lisp_Hash_Table *h)
{
- return h->count < 0;
+ return NILP (h->hash);
}
INLINE void