patch 8.2.0500: using the same loop in many places

Problem:    Using the same loop in many places.
Solution:   Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
diff --git a/src/if_py_both.h b/src/if_py_both.h
index c4d82e7..0d70de2 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -786,7 +786,7 @@
 	}
 
 	range_list_materialize(list);
-	for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
+	FOR_ALL_LIST_ITEMS(list, curr)
 	{
 	    if (!(newObj = VimToPython(&curr->li_tv, depth + 1, lookup_dict)))
 	    {
@@ -3035,7 +3035,7 @@
 		    return NULL;
 		}
 		curtv = argv;
-		for (li = argslist->lv_first; li != NULL; li = li->li_next)
+		FOR_ALL_LIST_ITEMS(argslist, li)
 		    copy_tv(&li->li_tv, curtv++);
 	    }
 	    list_unref(argslist);