summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
commitaeea72151c31d686bcbb7b06d895006d7363585c (patch)
tree500d487503a1a82cecc8f2a3e9bf89b50638fe5a /src/if_py_both.h
parentf10806b25090879fdc1a86cc0da2f4f34fd21921 (diff)
patch 8.2.0500: using the same loop in many placesv8.2.0500
Problem: Using the same loop in many places. Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h4
1 files changed, 2 insertions, 2 deletions
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);