comparison src/if_py_both.h @ 19888:435726a03481 v8.2.0500

patch 8.2.0500: using the same loop in many places Commit: https://github.com/vim/vim/commit/aeea72151c31d686bcbb7b06d895006d7363585c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 2 18:50:46 2020 +0200 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 https://github.com/vim/vim/issues/5339)
author Bram Moolenaar <Bram@vim.org>
date Thu, 02 Apr 2020 19:00:05 +0200
parents d776967d0f0d
children 1f42c49c3d29
comparison
equal deleted inserted replaced
19887:d03edd8c7e2f 19888:435726a03481
784 Py_DECREF(ret); 784 Py_DECREF(ret);
785 return NULL; 785 return NULL;
786 } 786 }
787 787
788 range_list_materialize(list); 788 range_list_materialize(list);
789 for (curr = list->lv_first; curr != NULL; curr = curr->li_next) 789 FOR_ALL_LIST_ITEMS(list, curr)
790 { 790 {
791 if (!(newObj = VimToPython(&curr->li_tv, depth + 1, lookup_dict))) 791 if (!(newObj = VimToPython(&curr->li_tv, depth + 1, lookup_dict)))
792 { 792 {
793 Py_DECREF(ret); 793 Py_DECREF(ret);
794 return NULL; 794 return NULL;
3033 dict_unref(selfdict); 3033 dict_unref(selfdict);
3034 list_unref(argslist); 3034 list_unref(argslist);
3035 return NULL; 3035 return NULL;
3036 } 3036 }
3037 curtv = argv; 3037 curtv = argv;
3038 for (li = argslist->lv_first; li != NULL; li = li->li_next) 3038 FOR_ALL_LIST_ITEMS(argslist, li)
3039 copy_tv(&li->li_tv, curtv++); 3039 copy_tv(&li->li_tv, curtv++);
3040 } 3040 }
3041 list_unref(argslist); 3041 list_unref(argslist);
3042 } 3042 }
3043 if (selfdict != NULL) 3043 if (selfdict != NULL)