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.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index b3ed77d..bb3122f 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2868,9 +2868,9 @@
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 @@
{
// 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 @@
// 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 @@
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 @@
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;