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/mbyte.c b/src/mbyte.c
index 57aa619..5e6aed0 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -1579,7 +1579,7 @@
// values of them.
//
// Note that these symbols are of varying widths, as they are symbols
- // representing differents things ranging from a simple gear icon to an
+ // representing different things ranging from a simple gear icon to an
// airplane. Some of them are in fact wider than double-width, but Vim
// doesn't support non-fixed-width font, and tagging them as
// double-width is the best way to handle them.
@@ -5647,7 +5647,7 @@
// Check that all entries are a list with three numbers, the range is
// valid and the cell width is valid.
item = 0;
- for (li = l->lv_first; li != NULL; li = li->li_next)
+ FOR_ALL_LIST_ITEMS(l, li)
{
listitem_T *lili;
varnumber_T n1;