diff options
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/list.c b/src/list.c index eb76cc683..6242e5243 100644 --- a/src/list.c +++ b/src/list.c @@ -378,8 +378,8 @@ list_equal( if (l1 == NULL || l2 == NULL) return FALSE; - range_list_materialize(l1); - range_list_materialize(l2); + CHECK_LIST_MATERIALIZE(l1); + CHECK_LIST_MATERIALIZE(l2); for (item1 = l1->lv_first, item2 = l2->lv_first; item1 != NULL && item2 != NULL; @@ -411,7 +411,7 @@ list_find(list_T *l, long n) if (n < 0 || n >= l->lv_len) return NULL; - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); // When there is a cached index may start search from there. if (l->lv_u.mat.lv_idx_item != NULL) @@ -541,7 +541,7 @@ list_idx_of_item(list_T *l, listitem_T *item) if (l == NULL) return -1; - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); idx = 0; for (li = l->lv_first; li != NULL && li != item; li = li->li_next) ++idx; @@ -556,7 +556,7 @@ list_idx_of_item(list_T *l, listitem_T *item) void list_append(list_T *l, listitem_T *item) { - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); if (l->lv_u.mat.lv_last == NULL) { // empty list @@ -706,7 +706,7 @@ list_insert_tv(list_T *l, typval_T *tv, listitem_T *item) void list_insert(list_T *l, listitem_T *ni, listitem_T *item) { - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); if (item == NULL) // Append new item at end of list. list_append(l, ni); @@ -741,8 +741,8 @@ list_extend(list_T *l1, list_T *l2, listitem_T *bef) listitem_T *item; int todo = l2->lv_len; - range_list_materialize(l1); - range_list_materialize(l2); + CHECK_LIST_MATERIALIZE(l1); + CHECK_LIST_MATERIALIZE(l2); // We also quit the loop when we have inserted the original item count of // the list, avoid a hang when we extend a list with itself. @@ -801,7 +801,7 @@ list_copy(list_T *orig, int deep, int copyID) orig->lv_copyID = copyID; orig->lv_copylist = copy; } - range_list_materialize(orig); + CHECK_LIST_MATERIALIZE(orig); for (item = orig->lv_first; item != NULL && !got_int; item = item->li_next) { @@ -842,7 +842,7 @@ vimlist_remove(list_T *l, listitem_T *item, listitem_T *item2) { listitem_T *ip; - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); // notify watchers for (ip = item; ip != NULL; ip = ip->li_next) @@ -877,7 +877,7 @@ list2string(typval_T *tv, int copyID, int restore_copyID) return NULL; ga_init2(&ga, (int)sizeof(char), 80); ga_append(&ga, '['); - range_list_materialize(tv->vval.v_list); + CHECK_LIST_MATERIALIZE(tv->vval.v_list); if (list_join(&ga, tv->vval.v_list, (char_u *)", ", FALSE, restore_copyID, copyID) == FAIL) { @@ -915,7 +915,7 @@ list_join_inner( char_u *s; // Stringify each item in the list. - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); for (item = l->lv_first; item != NULL && !got_int; item = item->li_next) { s = echo_string_core(&item->li_tv, &tofree, numbuf, copyID, @@ -1116,7 +1116,7 @@ write_list(FILE *fd, list_T *list, int binary) int ret = OK; char_u *s; - range_list_materialize(list); + CHECK_LIST_MATERIALIZE(list); FOR_ALL_LIST_ITEMS(list, li) { for (s = tv_get_string(&li->li_tv); *s != NUL; ++s) @@ -1203,7 +1203,7 @@ f_list2str(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_UNKNOWN) utf8 = (int)tv_get_number_chk(&argvars[1], NULL); - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); ga_init2(&ga, 1, 80); if (has_mbyte || utf8) { @@ -1496,7 +1496,7 @@ do_sort_uniq(typval_T *argvars, typval_T *rettv, int sort) TRUE)) goto theend; rettv_list_set(rettv, l); - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); len = list_len(l); if (len <= 1) @@ -1873,7 +1873,7 @@ filter_map(typval_T *argvars, typval_T *rettv, int map) // set_vim_var_nr() doesn't set the type set_vim_var_type(VV_KEY, VAR_NUMBER); - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); if (map && l->lv_lock == 0) l->lv_lock = VAR_LOCKED; for (li = l->lv_first; li != NULL; li = nli) @@ -2011,7 +2011,7 @@ f_count(typval_T *argvars, typval_T *rettv) if ((l = argvars[0].vval.v_list) != NULL) { - range_list_materialize(l); + CHECK_LIST_MATERIALIZE(l); li = l->lv_first; if (argvars[2].v_type != VAR_UNKNOWN) { |