mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
vim-patch:8.2.1209: Vim9: test failure
Problem: Vim9: test failure.
Solution: Add missing changes to hashtab.
21c16f868d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
d302c0e35e
commit
73a6000120
@ -223,6 +223,7 @@ int hash_add(hashtab_T *ht, char *key)
|
|||||||
void hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash)
|
void hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash)
|
||||||
{
|
{
|
||||||
ht->ht_used++;
|
ht->ht_used++;
|
||||||
|
ht->ht_changed++;
|
||||||
if (hi->hi_key == NULL) {
|
if (hi->hi_key == NULL) {
|
||||||
ht->ht_filled++;
|
ht->ht_filled++;
|
||||||
}
|
}
|
||||||
@ -242,6 +243,7 @@ void hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash)
|
|||||||
void hash_remove(hashtab_T *ht, hashitem_T *hi)
|
void hash_remove(hashtab_T *ht, hashitem_T *hi)
|
||||||
{
|
{
|
||||||
ht->ht_used--;
|
ht->ht_used--;
|
||||||
|
ht->ht_changed++;
|
||||||
hi->hi_key = HI_KEY_REMOVED;
|
hi->hi_key = HI_KEY_REMOVED;
|
||||||
hash_may_resize(ht, 0);
|
hash_may_resize(ht, 0);
|
||||||
}
|
}
|
||||||
@ -384,6 +386,7 @@ static void hash_may_resize(hashtab_T *ht, size_t minitems)
|
|||||||
ht->ht_array = newarray;
|
ht->ht_array = newarray;
|
||||||
ht->ht_mask = newmask;
|
ht->ht_mask = newmask;
|
||||||
ht->ht_filled = ht->ht_used;
|
ht->ht_filled = ht->ht_used;
|
||||||
|
ht->ht_changed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HASH_CYCLE_BODY(hash, p) \
|
#define HASH_CYCLE_BODY(hash, p) \
|
||||||
|
Loading…
Reference in New Issue
Block a user