Mercurial > vim
diff src/evalvars.c @ 21120:4d844a65183d v8.2.1111
patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
Commit: https://github.com/vim/vim/commit/9a78e6df17033223ebdf499f2b02b2538601c52d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 1 18:29:55 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Jul 2020 18:45:04 +0200 |
parents | a7c202f5cbe9 |
children | 951aad18b1af |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -1124,7 +1124,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, { if (tofree != NULL) name = tofree; - if (get_var_tv(name, len, &tv, NULL, TRUE, FALSE) == FAIL) + if (eval_variable(name, len, &tv, NULL, TRUE, FALSE) == FAIL) error = TRUE; else { @@ -2365,7 +2365,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg) * Return OK or FAIL. If OK is returned "rettv" must be cleared. */ int -get_var_tv( +eval_variable( char_u *name, int len, // length of "name" typval_T *rettv, // NULL when only checking existence @@ -3206,7 +3206,7 @@ getwinvar( done = TRUE; } } - else if (get_option_tv(&varname, rettv, 1) == OK) + else if (eval_option(&varname, rettv, 1) == OK) // window-local-option done = TRUE; } @@ -3342,7 +3342,7 @@ var_exists(char_u *var) { if (tofree != NULL) name = tofree; - n = (get_var_tv(name, len, &tv, NULL, FALSE, TRUE) == OK); + n = (eval_variable(name, len, &tv, NULL, FALSE, TRUE) == OK); if (n) { // handle d.key, l[idx], f(expr) @@ -3609,7 +3609,7 @@ f_getbufvar(typval_T *argvars, typval_T done = TRUE; } } - else if (get_option_tv(&varname, rettv, TRUE) == OK) + else if (eval_option(&varname, rettv, TRUE) == OK) // buffer-local-option done = TRUE;