0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()

Problem:    Inconsistent naming of get_list_tv() and eval_dict().
Solution:   Rename get_list_tv() to eval_list().  Similarly for eval_number(),
            eval_string(), eval_lit_string() and a few others.
This commit is contained in:
Bram Moolenaar
2020-07-01 18:29:55 +02:00
parent e6b5324e3a
commit 9a78e6df17
12 changed files with 55 additions and 50 deletions

View File

@@ -2868,9 +2868,9 @@ compile_call(
argvars[0].v_type = VAR_UNKNOWN;
if (*s == '"')
(void)get_string_tv(&s, &argvars[0], TRUE);
(void)eval_string(&s, &argvars[0], TRUE);
else if (*s == '\'')
(void)get_lit_string_tv(&s, &argvars[0], TRUE);
(void)eval_lit_string(&s, &argvars[0], TRUE);
s = skipwhite(s);
if (*s == ')' && argvars[0].v_type == VAR_STRING)
{
@@ -2992,7 +2992,7 @@ to_name_const_end(char_u *arg)
{
// Can be "[1, 2, 3]->Func()".
if (get_list_tv(&p, &rettv, NULL, FALSE) == FAIL)
if (eval_list(&p, &rettv, NULL, FALSE) == FAIL)
p = arg;
}
else if (p == arg && *arg == '#' && arg[1] == '{')
@@ -3270,10 +3270,10 @@ compile_get_option(char_u **arg, cctx_T *cctx)
// parse the option and get the current value to get the type.
rettv.v_type = VAR_UNKNOWN;
ret = get_option_tv(arg, &rettv, TRUE);
ret = eval_option(arg, &rettv, TRUE);
if (ret == OK)
{
// include the '&' in the name, get_option_tv() expects it.
// include the '&' in the name, eval_option() expects it.
char_u *name = vim_strnsave(start, *arg - start);
type_T *type = rettv.v_type == VAR_NUMBER ? &t_number : &t_string;
@@ -3304,7 +3304,7 @@ compile_get_env(char_u **arg, cctx_T *cctx)
return FAIL;
}
// include the '$' in the name, get_env_tv() expects it.
// include the '$' in the name, eval_env_var() expects it.
name = vim_strnsave(start, len + 1);
ret = generate_LOAD(cctx, ISN_LOADENV, 0, name, &t_string);
vim_free(name);
@@ -3761,21 +3761,21 @@ compile_expr7(
case '7':
case '8':
case '9':
case '.': if (get_number_tv(arg, rettv, TRUE, FALSE) == FAIL)
case '.': if (eval_number(arg, rettv, TRUE, FALSE) == FAIL)
return FAIL;
break;
/*
* String constant: "string".
*/
case '"': if (get_string_tv(arg, rettv, TRUE) == FAIL)
case '"': if (eval_string(arg, rettv, TRUE) == FAIL)
return FAIL;
break;
/*
* Literal string constant: 'str''ing'.
*/
case '\'': if (get_lit_string_tv(arg, rettv, TRUE) == FAIL)
case '\'': if (eval_lit_string(arg, rettv, TRUE) == FAIL)
return FAIL;
break;