diff options
author | Ernie Rael <errael@raelity.com> | 2023-10-04 20:16:22 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-04 20:16:22 +0200 |
commit | 64885645e76b301a6c34fe762c4e29c7a0f63881 (patch) | |
tree | 2fe2d6325cbbdc1812da80226784060485afd939 /src/evalvars.c | |
parent | 0583491277dea9d14e000051c26405b90d839072 (diff) |
patch 9.0.1982: vim9: clean up from v9.0.1955v9.0.1982
Problem: vim9: clean up from v9.0.1955
Solution: Fix a few remaining issues, improve error message
- Use `cl_exec`, the executing class, to check permissions in `get_lval()`.
- Handle lockvar of script variable from class.
- Add 'in class "Xxx"' to e_cannot_access_private_variable_str.
closes: #13222
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index fc977c66ae..14b7dc39a4 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -2278,30 +2278,6 @@ do_lock_var( return ret; } -#ifdef LOG_LOCKVAR - static char * -vartype_tostring(vartype_T vartype) -{ - return - vartype == VAR_BOOL ? "v_number" - : vartype == VAR_SPECIAL ? "v_number" - : vartype == VAR_NUMBER ? "v_number" - : vartype == VAR_FLOAT ? "v_float" - : vartype == VAR_STRING ? "v_string" - : vartype == VAR_BLOB ? "v_blob" - : vartype == VAR_FUNC ? "v_string" - : vartype == VAR_PARTIAL ? "v_partial" - : vartype == VAR_LIST ? "v_list" - : vartype == VAR_DICT ? "v_dict" - : vartype == VAR_JOB ? "v_job" - : vartype == VAR_CHANNEL ? "v_channel" - : vartype == VAR_INSTR ? "v_instr" - : vartype == VAR_CLASS ? "v_class" - : vartype == VAR_OBJECT ? "v_object" - : ""; -} -#endif - /* * Lock or unlock an item. "deep" is nr of levels to go. * When "check_refcount" is TRUE do not lock a list or dict with a reference @@ -2319,7 +2295,7 @@ item_lock(typval_T *tv, int deep, int lock, int check_refcount) int todo; #ifdef LOG_LOCKVAR - ch_log(NULL, "LKVAR: item_lock(): type %s", vartype_tostring(tv->v_type)); + ch_log(NULL, "LKVAR: item_lock(): type %s", vartype_name(tv->v_type)); #endif if (recurse >= DICT_MAXNEST) |