mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.0173: build fails with old compiler
Problem: Build fails with old compiler. Solution: Do not use anonymous unions. (John Marriott)
This commit is contained in:
@@ -4070,7 +4070,7 @@ f_index(typval_T *argvars, typval_T *rettv)
|
||||
// Start at specified item. Use the cached index that list_find()
|
||||
// sets, so that a negative number also works.
|
||||
item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
|
||||
idx = l->lv_idx;
|
||||
idx = l->lv_u.mat.lv_idx;
|
||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||
ic = (int)tv_get_number_chk(&argvars[3], &error);
|
||||
if (error)
|
||||
@@ -4678,7 +4678,7 @@ find_some_match(typval_T *argvars, typval_T *rettv, matchtype_T type)
|
||||
li = list_find(l, start);
|
||||
if (li == NULL)
|
||||
goto theend;
|
||||
idx = l->lv_idx; // use the cached index
|
||||
idx = l->lv_u.mat.lv_idx; // use the cached index
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5330,9 +5330,9 @@ f_range(typval_T *argvars, typval_T *rettv)
|
||||
// works with ":for". If used otherwise range_list_materialize() must
|
||||
// be called.
|
||||
list->lv_first = &range_list_item;
|
||||
list->lv_start = start;
|
||||
list->lv_end = end;
|
||||
list->lv_stride = stride;
|
||||
list->lv_u.nonmat.lv_start = start;
|
||||
list->lv_u.nonmat.lv_end = end;
|
||||
list->lv_u.nonmat.lv_stride = stride;
|
||||
list->lv_len = (end - start) / stride + 1;
|
||||
}
|
||||
}
|
||||
@@ -5345,15 +5345,15 @@ range_list_materialize(list_T *list)
|
||||
{
|
||||
if (list->lv_first == &range_list_item)
|
||||
{
|
||||
varnumber_T start = list->lv_start;
|
||||
varnumber_T end = list->lv_end;
|
||||
int stride = list->lv_stride;
|
||||
varnumber_T start = list->lv_u.nonmat.lv_start;
|
||||
varnumber_T end = list->lv_u.nonmat.lv_end;
|
||||
int stride = list->lv_u.nonmat.lv_stride;
|
||||
varnumber_T i;
|
||||
|
||||
list->lv_first = NULL;
|
||||
list->lv_last = NULL;
|
||||
list->lv_u.mat.lv_last = NULL;
|
||||
list->lv_len = 0;
|
||||
list->lv_idx_item = NULL;
|
||||
list->lv_u.mat.lv_idx_item = NULL;
|
||||
for (i = start; stride > 0 ? i <= end : i >= end; i += stride)
|
||||
if (list_append_number(list, (varnumber_T)i) == FAIL)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user