diff options
| author | Paul Eggert | 2019-07-22 18:33:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-22 18:34:16 -0700 |
| commit | 3f4a9a5a3b267fbc13a8bebc4295bbfadd6ff03e (patch) | |
| tree | 27b50199a92bcfc6668f38a63e6b5d20cce2760a /src/pdumper.c | |
| parent | c34496d0b956abc9d1ad55daa53ba626138233f4 (diff) | |
| download | emacs-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.c | 2 |
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, | |||
| 2628 | static bool | 2628 | static bool |
| 2629 | dump_hash_table_stable_p (const struct Lisp_Hash_Table *hash) | 2629 | dump_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); |