aboutsummaryrefslogtreecommitdiffstats
path: root/src/pdumper.c
diff options
context:
space:
mode:
authorPaul Eggert2019-07-22 18:33:39 -0700
committerPaul Eggert2019-07-22 18:34:16 -0700
commit3f4a9a5a3b267fbc13a8bebc4295bbfadd6ff03e (patch)
tree27b50199a92bcfc6668f38a63e6b5d20cce2760a /src/pdumper.c
parentc34496d0b956abc9d1ad55daa53ba626138233f4 (diff)
downloademacs-3f4a9a5a3b267fbc13a8bebc4295bbfadd6ff03e.tar.gz
emacs-3f4a9a5a3b267fbc13a8bebc4295bbfadd6ff03e.zip
Do not pdump user-defined hashtabs
* src/pdumper.c (dump_hash_table_stable_p): Signal an error if a hash table has user-defined tests (Bug#36769). * src/fns.c (hashfn_user_defined): Now extern.
Diffstat (limited to 'src/pdumper.c')
-rw-r--r--src/pdumper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index 2abac80a372..cda8b40be4c 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2628,6 +2628,8 @@ dump_vectorlike_generic (struct dump_context *ctx,
2628static bool 2628static bool
2629dump_hash_table_stable_p (const struct Lisp_Hash_Table *hash) 2629dump_hash_table_stable_p (const struct Lisp_Hash_Table *hash)
2630{ 2630{
2631 if (hash->test.hashfn == hashfn_user_defined)
2632 error ("cannot dump hash tables with user-defined tests"); /* Bug#36769 */
2631 bool is_eql = hash->test.hashfn == hashfn_eql; 2633 bool is_eql = hash->test.hashfn == hashfn_eql;
2632 bool is_equal = hash->test.hashfn == hashfn_equal; 2634 bool is_equal = hash->test.hashfn == hashfn_equal;
2633 ptrdiff_t size = HASH_TABLE_SIZE (hash); 2635 ptrdiff_t size = HASH_TABLE_SIZE (hash);