patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
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)
diff --git a/src/testing.c b/src/testing.c
index b31d192..3f4387c 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -181,7 +181,7 @@
return;
todo = (int)exp_d->dv_hashtab.ht_used;
- for (hi = exp_d->dv_hashtab.ht_array; todo > 0; ++hi)
+ FOR_ALL_HASHTAB_ITEMS(&exp_d->dv_hashtab, hi, todo)
{
if (!HASHITEM_EMPTY(hi))
{
@@ -204,7 +204,7 @@
// Add items only present in got_d.
todo = (int)got_d->dv_hashtab.ht_used;
- for (hi = got_d->dv_hashtab.ht_array; todo > 0; ++hi)
+ FOR_ALL_HASHTAB_ITEMS(&got_d->dv_hashtab, hi, todo)
{
if (!HASHITEM_EMPTY(hi))
{