mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.3796: the funcexe_T struct members are not named consistently (#20214)
Problem: The funcexe_T struct members are not named consistently.
Solution: Prefix "fe_" to all the members.
851f86b951
Omit fe_check_type: always NULL in legacy Vim script.
This commit is contained in:
parent
754822a066
commit
3dda52d860
@ -204,10 +204,10 @@ static Object _call_function(String fn, Array args, dict_T *self, Error *err)
|
|||||||
try_start();
|
try_start();
|
||||||
typval_T rettv;
|
typval_T rettv;
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.selfdict = self;
|
funcexe.fe_selfdict = self;
|
||||||
// call_func() retval is deceptive, ignore it. Instead we set `msg_list`
|
// call_func() retval is deceptive, ignore it. Instead we set `msg_list`
|
||||||
// (see above) to capture abort-causing non-exception errors.
|
// (see above) to capture abort-causing non-exception errors.
|
||||||
(void)call_func(fn.data, (int)fn.size, &rettv, (int)args.size,
|
(void)call_func(fn.data, (int)fn.size, &rettv, (int)args.size,
|
||||||
|
@ -757,7 +757,7 @@ int eval_expr_typval(const typval_T *expr, typval_T *argv, int argc, typval_T *r
|
|||||||
if (s == NULL || *s == NUL) {
|
if (s == NULL || *s == NUL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
if (call_func(s, -1, rettv, argc, argv, &funcexe) == FAIL) {
|
if (call_func(s, -1, rettv, argc, argv, &funcexe) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -767,8 +767,8 @@ int eval_expr_typval(const typval_T *expr, typval_T *argv, int argc, typval_T *r
|
|||||||
if (s == NULL || *s == NUL) {
|
if (s == NULL || *s == NUL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
if (call_func(s, -1, rettv, argc, argv, &funcexe) == FAIL) {
|
if (call_func(s, -1, rettv, argc, argv, &funcexe) == FAIL) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -1093,10 +1093,10 @@ int call_vim_function(const char *func, int argc, typval_T *argv, typval_T *rett
|
|||||||
|
|
||||||
rettv->v_type = VAR_UNKNOWN; // tv_clear() uses this.
|
rettv->v_type = VAR_UNKNOWN; // tv_clear() uses this.
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = pt;
|
funcexe.fe_partial = pt;
|
||||||
ret = call_func(func, len, rettv, argc, argv, &funcexe);
|
ret = call_func(func, len, rettv, argc, argv, &funcexe);
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
@ -2227,11 +2227,11 @@ static int eval_func(char **const arg, char *const name, const int name_len, typ
|
|||||||
|
|
||||||
// Invoke the function.
|
// Invoke the function.
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = evaluate;
|
funcexe.fe_evaluate = evaluate;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
funcexe.basetv = basetv;
|
funcexe.fe_basetv = basetv;
|
||||||
int ret = get_func_tv((char_u *)s, len, rettv, arg, &funcexe);
|
int ret = get_func_tv((char_u *)s, len, rettv, arg, &funcexe);
|
||||||
|
|
||||||
xfree(s);
|
xfree(s);
|
||||||
@ -3211,12 +3211,12 @@ static int call_func_rettv(char **const arg, typval_T *const rettv, const bool e
|
|||||||
}
|
}
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = evaluate;
|
funcexe.fe_evaluate = evaluate;
|
||||||
funcexe.partial = pt;
|
funcexe.fe_partial = pt;
|
||||||
funcexe.selfdict = selfdict;
|
funcexe.fe_selfdict = selfdict;
|
||||||
funcexe.basetv = basetv;
|
funcexe.fe_basetv = basetv;
|
||||||
const int ret = get_func_tv((char_u *)funcname, is_lua ? (int)(*arg - funcname) : -1, rettv,
|
const int ret = get_func_tv((char_u *)funcname, is_lua ? (int)(*arg - funcname) : -1, rettv,
|
||||||
arg, &funcexe);
|
arg, &funcexe);
|
||||||
|
|
||||||
@ -5869,10 +5869,10 @@ bool callback_call(Callback *const callback, const int argcount_in, typval_T *co
|
|||||||
}
|
}
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
return call_func(name, -1, rettv, argcount_in, argvars_in, &funcexe);
|
return call_func(name, -1, rettv, argcount_in, argvars_in, &funcexe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8491,9 +8491,9 @@ typval_T eval_call_provider(char *provider, char *method, list_T *arguments, boo
|
|||||||
tv_list_ref(arguments);
|
tv_list_ref(arguments);
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
(void)call_func(func, name_len, &rettv, 2, argvars, &funcexe);
|
(void)call_func(func, name_len, &rettv, 2, argvars, &funcexe);
|
||||||
|
|
||||||
tv_list_unref(arguments);
|
tv_list_unref(arguments);
|
||||||
|
@ -6498,8 +6498,8 @@ static void f_reduce(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
|
|
||||||
typval_T initial;
|
typval_T initial;
|
||||||
typval_T argv[3];
|
typval_T argv[3];
|
||||||
|
@ -1086,9 +1086,9 @@ static int item_compare2(const void *s1, const void *s2, bool keep_zero)
|
|||||||
|
|
||||||
rettv.v_type = VAR_UNKNOWN; // tv_clear() uses this
|
rettv.v_type = VAR_UNKNOWN; // tv_clear() uses this
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
funcexe.selfdict = sortinfo->item_compare_selfdict;
|
funcexe.fe_selfdict = sortinfo->item_compare_selfdict;
|
||||||
res = call_func(func_name, -1, &rettv, 2, argv, &funcexe);
|
res = call_func(func_name, -1, &rettv, 2, argv, &funcexe);
|
||||||
tv_clear(&argv[0]);
|
tv_clear(&argv[0]);
|
||||||
tv_clear(&argv[1]);
|
tv_clear(&argv[1]);
|
||||||
|
@ -425,12 +425,12 @@ int get_func_tv(const char_u *name, int len, typval_T *rettv, char **arg, funcex
|
|||||||
// Get the arguments.
|
// Get the arguments.
|
||||||
argp = *arg;
|
argp = *arg;
|
||||||
while (argcount < MAX_FUNC_ARGS
|
while (argcount < MAX_FUNC_ARGS
|
||||||
- (funcexe->partial == NULL ? 0 : funcexe->partial->pt_argc)) {
|
- (funcexe->fe_partial == NULL ? 0 : funcexe->fe_partial->pt_argc)) {
|
||||||
argp = skipwhite(argp + 1); // skip the '(' or ','
|
argp = skipwhite(argp + 1); // skip the '(' or ','
|
||||||
if (*argp == ')' || *argp == ',' || *argp == NUL) {
|
if (*argp == ')' || *argp == ',' || *argp == NUL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (eval1(&argp, &argvars[argcount], funcexe->evaluate) == FAIL) {
|
if (eval1(&argp, &argvars[argcount], funcexe->fe_evaluate) == FAIL) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1339,11 +1339,11 @@ int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict
|
|||||||
});
|
});
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
funcexe.selfdict = selfdict;
|
funcexe.fe_selfdict = selfdict;
|
||||||
r = call_func((char *)name, -1, rettv, argc, argv, &funcexe);
|
r = call_func((char *)name, -1, rettv, argc, argv, &funcexe);
|
||||||
|
|
||||||
func_call_skip_call:
|
func_call_skip_call:
|
||||||
@ -1429,12 +1429,12 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int argcount = argcount_in;
|
int argcount = argcount_in;
|
||||||
typval_T *argvars = argvars_in;
|
typval_T *argvars = argvars_in;
|
||||||
dict_T *selfdict = funcexe->selfdict;
|
dict_T *selfdict = funcexe->fe_selfdict;
|
||||||
typval_T argv[MAX_FUNC_ARGS + 1]; // used when "partial" or
|
typval_T argv[MAX_FUNC_ARGS + 1]; // used when "partial" or
|
||||||
// "funcexe->basetv" is not NULL
|
// "funcexe->fe_basetv" is not NULL
|
||||||
int argv_clear = 0;
|
int argv_clear = 0;
|
||||||
int argv_base = 0;
|
int argv_base = 0;
|
||||||
partial_T *partial = funcexe->partial;
|
partial_T *partial = funcexe->fe_partial;
|
||||||
|
|
||||||
// Initialize rettv so that it is safe for caller to invoke clear_tv(rettv)
|
// Initialize rettv so that it is safe for caller to invoke clear_tv(rettv)
|
||||||
// even when call_func() returns FAIL.
|
// even when call_func() returns FAIL.
|
||||||
@ -1453,8 +1453,8 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
fname = fname_trans_sid(name, (char *)fname_buf, &tofree, &error);
|
fname = fname_trans_sid(name, (char *)fname_buf, &tofree, &error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (funcexe->doesrange != NULL) {
|
if (funcexe->fe_doesrange != NULL) {
|
||||||
*funcexe->doesrange = false;
|
*funcexe->fe_doesrange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (partial != NULL) {
|
if (partial != NULL) {
|
||||||
@ -1480,7 +1480,7 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error == FCERR_NONE && funcexe->evaluate) {
|
if (error == FCERR_NONE && funcexe->fe_evaluate) {
|
||||||
char *rfname = fname;
|
char *rfname = fname;
|
||||||
|
|
||||||
// Ignore "g:" before a function name.
|
// Ignore "g:" before a function name.
|
||||||
@ -1495,7 +1495,7 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
if (is_luafunc(partial)) {
|
if (is_luafunc(partial)) {
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
error = FCERR_NONE;
|
error = FCERR_NONE;
|
||||||
argv_add_base(funcexe->basetv, &argvars, &argcount, argv, &argv_base);
|
argv_add_base(funcexe->fe_basetv, &argvars, &argcount, argv, &argv_base);
|
||||||
nlua_typval_call(funcname, (size_t)len, argvars, argcount, rettv);
|
nlua_typval_call(funcname, (size_t)len, argvars, argcount, rettv);
|
||||||
} else {
|
} else {
|
||||||
// v:lua was called directly; show its name in the emsg
|
// v:lua was called directly; show its name in the emsg
|
||||||
@ -1527,16 +1527,16 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
} else if (fp != NULL && (fp->uf_flags & FC_LUAREF)) {
|
} else if (fp != NULL && (fp->uf_flags & FC_LUAREF)) {
|
||||||
error = typval_exec_lua_callable(fp->uf_luaref, argcount, argvars, rettv);
|
error = typval_exec_lua_callable(fp->uf_luaref, argcount, argvars, rettv);
|
||||||
} else if (fp != NULL) {
|
} else if (fp != NULL) {
|
||||||
if (funcexe->argv_func != NULL) {
|
if (funcexe->fe_argv_func != NULL) {
|
||||||
// postponed filling in the arguments, do it now
|
// postponed filling in the arguments, do it now
|
||||||
argcount = funcexe->argv_func(argcount, argvars, argv_clear,
|
argcount = funcexe->fe_argv_func(argcount, argvars, argv_clear,
|
||||||
fp->uf_args.ga_len);
|
fp->uf_args.ga_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
argv_add_base(funcexe->basetv, &argvars, &argcount, argv, &argv_base);
|
argv_add_base(funcexe->fe_basetv, &argvars, &argcount, argv, &argv_base);
|
||||||
|
|
||||||
if (fp->uf_flags & FC_RANGE && funcexe->doesrange != NULL) {
|
if (fp->uf_flags & FC_RANGE && funcexe->fe_doesrange != NULL) {
|
||||||
*funcexe->doesrange = true;
|
*funcexe->fe_doesrange = true;
|
||||||
}
|
}
|
||||||
if (argcount < fp->uf_args.ga_len - fp->uf_def_args.ga_len) {
|
if (argcount < fp->uf_args.ga_len - fp->uf_def_args.ga_len) {
|
||||||
error = FCERR_TOOFEW;
|
error = FCERR_TOOFEW;
|
||||||
@ -1546,17 +1546,17 @@ int call_func(const char *funcname, int len, typval_T *rettv, int argcount_in, t
|
|||||||
error = FCERR_DICT;
|
error = FCERR_DICT;
|
||||||
} else {
|
} else {
|
||||||
// Call the user function.
|
// Call the user function.
|
||||||
call_user_func(fp, argcount, argvars, rettv, funcexe->firstline,
|
call_user_func(fp, argcount, argvars, rettv, funcexe->fe_firstline,
|
||||||
funcexe->lastline,
|
funcexe->fe_lastline,
|
||||||
(fp->uf_flags & FC_DICT) ? selfdict : NULL);
|
(fp->uf_flags & FC_DICT) ? selfdict : NULL);
|
||||||
error = FCERR_NONE;
|
error = FCERR_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (funcexe->basetv != NULL) {
|
} else if (funcexe->fe_basetv != NULL) {
|
||||||
// expr->method(): Find the method name in the table, call its
|
// expr->method(): Find the method name in the table, call its
|
||||||
// implementation with the base as one of the arguments.
|
// implementation with the base as one of the arguments.
|
||||||
error = call_internal_method((char_u *)fname, argcount, argvars, rettv,
|
error = call_internal_method((char_u *)fname, argcount, argvars, rettv,
|
||||||
funcexe->basetv);
|
funcexe->fe_basetv);
|
||||||
} else {
|
} else {
|
||||||
// Find the function name in the table, call its implementation.
|
// Find the function name in the table, call its implementation.
|
||||||
error = call_internal_func((char_u *)fname, argcount, argvars, rettv);
|
error = call_internal_func((char_u *)fname, argcount, argvars, rettv);
|
||||||
@ -2941,12 +2941,12 @@ void ex_call(exarg_T *eap)
|
|||||||
arg = startarg;
|
arg = startarg;
|
||||||
|
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = eap->line1;
|
funcexe.fe_firstline = eap->line1;
|
||||||
funcexe.lastline = eap->line2;
|
funcexe.fe_lastline = eap->line2;
|
||||||
funcexe.doesrange = &doesrange;
|
funcexe.fe_doesrange = &doesrange;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
funcexe.selfdict = fudi.fd_dict;
|
funcexe.fe_selfdict = fudi.fd_dict;
|
||||||
if (get_func_tv(name, -1, &rettv, (char **)&arg, &funcexe) == FAIL) {
|
if (get_func_tv(name, -1, &rettv, (char **)&arg, &funcexe) == FAIL) {
|
||||||
failed = true;
|
failed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -55,26 +55,26 @@ typedef int (*ArgvFunc)(int current_argcount, typval_T *argv, int argskip,
|
|||||||
|
|
||||||
/// Structure passed between functions dealing with function call execution.
|
/// Structure passed between functions dealing with function call execution.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ArgvFunc argv_func; ///< when not NULL, can be used to fill in arguments only
|
ArgvFunc fe_argv_func; ///< when not NULL, can be used to fill in arguments only
|
||||||
///< when the invoked function uses them
|
///< when the invoked function uses them
|
||||||
linenr_T firstline; ///< first line of range
|
linenr_T fe_firstline; ///< first line of range
|
||||||
linenr_T lastline; ///< last line of range
|
linenr_T fe_lastline; ///< last line of range
|
||||||
bool *doesrange; ///< [out] if not NULL: function handled range
|
bool *fe_doesrange; ///< [out] if not NULL: function handled range
|
||||||
bool evaluate; ///< actually evaluate expressions
|
bool fe_evaluate; ///< actually evaluate expressions
|
||||||
partial_T *partial; ///< for extra arguments
|
partial_T *fe_partial; ///< for extra arguments
|
||||||
dict_T *selfdict; ///< Dictionary for "self"
|
dict_T *fe_selfdict; ///< Dictionary for "self"
|
||||||
typval_T *basetv; ///< base for base->method()
|
typval_T *fe_basetv; ///< base for base->method()
|
||||||
} funcexe_T;
|
} funcexe_T;
|
||||||
|
|
||||||
#define FUNCEXE_INIT (funcexe_T) { \
|
#define FUNCEXE_INIT (funcexe_T) { \
|
||||||
.argv_func = NULL, \
|
.fe_argv_func = NULL, \
|
||||||
.firstline = 0, \
|
.fe_firstline = 0, \
|
||||||
.lastline = 0, \
|
.fe_lastline = 0, \
|
||||||
.doesrange = NULL, \
|
.fe_doesrange = NULL, \
|
||||||
.evaluate = false, \
|
.fe_evaluate = false, \
|
||||||
.partial = NULL, \
|
.fe_partial = NULL, \
|
||||||
.selfdict = NULL, \
|
.fe_selfdict = NULL, \
|
||||||
.basetv = NULL, \
|
.fe_basetv = NULL, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FUNCARG(fp, j) ((char **)(fp->uf_args.ga_data))[j]
|
#define FUNCARG(fp, j) ((char **)(fp->uf_args.ga_data))[j]
|
||||||
|
@ -1110,9 +1110,9 @@ int nlua_call(lua_State *lstate)
|
|||||||
try_start();
|
try_start();
|
||||||
typval_T rettv;
|
typval_T rettv;
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.firstline = curwin->w_cursor.lnum;
|
funcexe.fe_firstline = curwin->w_cursor.lnum;
|
||||||
funcexe.lastline = curwin->w_cursor.lnum;
|
funcexe.fe_lastline = curwin->w_cursor.lnum;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
// call_func() retval is deceptive, ignore it. Instead we set `msg_list`
|
// call_func() retval is deceptive, ignore it. Instead we set `msg_list`
|
||||||
// (TRY_WRAP) to capture abort-causing non-exception errors.
|
// (TRY_WRAP) to capture abort-causing non-exception errors.
|
||||||
(void)call_func((char *)name, (int)name_len, &rettv, nargs, vim_args, &funcexe);
|
(void)call_func((char *)name, (int)name_len, &rettv, nargs, vim_args, &funcexe);
|
||||||
|
@ -1803,8 +1803,8 @@ static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int des
|
|||||||
argv[0].v_type = VAR_LIST;
|
argv[0].v_type = VAR_LIST;
|
||||||
argv[0].vval.v_list = &matchList.sl_list;
|
argv[0].vval.v_list = &matchList.sl_list;
|
||||||
funcexe_T funcexe = FUNCEXE_INIT;
|
funcexe_T funcexe = FUNCEXE_INIT;
|
||||||
funcexe.argv_func = fill_submatch_list;
|
funcexe.fe_argv_func = fill_submatch_list;
|
||||||
funcexe.evaluate = true;
|
funcexe.fe_evaluate = true;
|
||||||
if (expr->v_type == VAR_FUNC) {
|
if (expr->v_type == VAR_FUNC) {
|
||||||
s = (char_u *)expr->vval.v_string;
|
s = (char_u *)expr->vval.v_string;
|
||||||
call_func((char *)s, -1, &rettv, 1, argv, &funcexe);
|
call_func((char *)s, -1, &rettv, 1, argv, &funcexe);
|
||||||
@ -1812,7 +1812,7 @@ static int vim_regsub_both(char_u *source, typval_T *expr, char_u *dest, int des
|
|||||||
partial_T *partial = expr->vval.v_partial;
|
partial_T *partial = expr->vval.v_partial;
|
||||||
|
|
||||||
s = (char_u *)partial_name(partial);
|
s = (char_u *)partial_name(partial);
|
||||||
funcexe.partial = partial;
|
funcexe.fe_partial = partial;
|
||||||
call_func((char *)s, -1, &rettv, 1, argv, &funcexe);
|
call_func((char *)s, -1, &rettv, 1, argv, &funcexe);
|
||||||
}
|
}
|
||||||
if (tv_list_len(&matchList.sl_list) > 0) {
|
if (tv_list_len(&matchList.sl_list) > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user