summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-03-07 17:13:51 +0000
committerBram Moolenaar <Bram@vim.org>2023-03-07 17:13:51 +0000
commit14113fdf9cb3d588c0d1c3a210246b981cf5aad3 (patch)
treea0f17ad3f6c5b31a0463e452122ba9e5aaa9705a /src/evalvars.c
parent663ee88a8260d69d9310e22f2bfdec49af6a102e (diff)
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected filev9.0.1390
Problem: FOR_ALL_ macros are defined in an unexpected file. Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS. (Yegappan Lakshmanan, closes #12109)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index b2343c0a2b..b123542872 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2317,7 +2317,7 @@ item_lock(typval_T *tv, int deep, int lock, int check_refcount)
{
// recursive: lock/unlock the items the List contains
todo = (int)d->dv_hashtab.ht_used;
- for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
+ FOR_ALL_HASHTAB_ITEMS(&d->dv_hashtab, hi, todo)
{
if (!HASHITEM_EMPTY(hi))
{
@@ -3571,7 +3571,7 @@ vars_clear_ext(hashtab_T *ht, int free_val)
hash_lock(ht);
todo = (int)ht->ht_used;
- for (hi = ht->ht_array; todo > 0; ++hi)
+ FOR_ALL_HASHTAB_ITEMS(ht, hi, todo)
{
if (!HASHITEM_EMPTY(hi))
{