diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-02 18:50:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-02 18:50:46 +0200 |
commit | aeea72151c31d686bcbb7b06d895006d7363585c (patch) | |
tree | 500d487503a1a82cecc8f2a3e9bf89b50638fe5a /src/if_py_both.h | |
parent | f10806b25090879fdc1a86cc0da2f4f34fd21921 (diff) | |
download | vim-git-aeea72151c31d686bcbb7b06d895006d7363585c.tar.gz |
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index c4d82e7f7..0d70de230 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); |