From aeea72151c31d686bcbb7b06d895006d7363585c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 2 Apr 2020 18:50:46 +0200 Subject: 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) --- src/if_py_both.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/if_py_both.h') diff --git a/src/if_py_both.h b/src/if_py_both.h index c4d82e7f71..0d70de2309 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -786,7 +786,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict) } 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 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs) 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); -- cgit v1.2.3