[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8ff0915 2/2: ; Add comment to hash_table_rehash (Bu
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 8ff0915 2/2: ; Add comment to hash_table_rehash (Bug#36447) |
Date: |
Sun, 14 Jul 2019 10:06:08 -0400 (EDT) |
branch: master
commit 8ff09154a29a1151afb2902267ca35f89ebda73c
Author: Stefan Monnier <address@hidden>
Commit: Noam Postavsky <address@hidden>
; Add comment to hash_table_rehash (Bug#36447)
* src/fns.c (hash_table_rehash): Add a comment to explain that
hash_table_rehash is not used in "normal" rehashing, but only in the
rare case of rehashing on the first access to a preloaded hash-table.
---
src/fns.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/fns.c b/src/fns.c
index 238a371..0497588 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4231,6 +4231,11 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
}
}
+/* Recompute the hashes (and hence also the "next" pointers).
+ Normally there's never a need to recompute hashes.
+ This is done only on first-access to a hash-table loaded from
+ the "pdump", because the object's addresses may have changed, thus
+ affecting their hash. */
void
hash_table_rehash (struct Lisp_Hash_Table *h)
{