diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -4406,9 +4406,12 @@ hash_clear (struct Lisp_Hash_Table *h) | |||
| 4406 | ptrdiff_t size = HASH_TABLE_SIZE (h); | 4406 | ptrdiff_t size = HASH_TABLE_SIZE (h); |
| 4407 | if (!hash_rehash_needed_p (h)) | 4407 | if (!hash_rehash_needed_p (h)) |
| 4408 | memclear (XVECTOR (h->hash)->contents, size * word_size); | 4408 | memclear (XVECTOR (h->hash)->contents, size * word_size); |
| 4409 | memclear (XVECTOR (h->key_and_value)->contents, size * 2 * word_size); | ||
| 4410 | for (ptrdiff_t i = 0; i < size; i++) | 4409 | for (ptrdiff_t i = 0; i < size; i++) |
| 4411 | set_hash_next_slot (h, i, i < size - 1 ? i + 1 : -1); | 4410 | { |
| 4411 | set_hash_next_slot (h, i, i < size - 1 ? i + 1 : -1); | ||
| 4412 | set_hash_key_slot (h, i, Qunbound); | ||
| 4413 | set_hash_value_slot (h, i, Qnil); | ||
| 4414 | } | ||
| 4412 | 4415 | ||
| 4413 | for (ptrdiff_t i = 0; i < ASIZE (h->index); i++) | 4416 | for (ptrdiff_t i = 0; i < ASIZE (h->index); i++) |
| 4414 | ASET (h->index, i, make_fixnum (-1)); | 4417 | ASET (h->index, i, make_fixnum (-1)); |