diff src/dict.c @ 22298:07e48ee8c3bb v8.2.1698

patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 Commit: https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 16 21:08:28 2020 +0200 patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work.
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Sep 2020 21:15:05 +0200
parents a211bca98bc3
children 542682b758dc
line wrap: on
line diff
--- a/src/dict.c
+++ b/src/dict.c
@@ -1009,7 +1009,7 @@ dict_extend(dict_T *d1, dict_T *d2, char
 	    }
 	    else if (*action == 'f' && HI2DI(hi2) != di1)
 	    {
-		if (var_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
+		if (value_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
 			|| var_check_ro(di1->di_flags, arg_errmsg, TRUE))
 		    break;
 		clear_tv(&di1->di_tv);
@@ -1227,7 +1227,7 @@ dict_remove(typval_T *argvars, typval_T 
     if (argvars[2].v_type != VAR_UNKNOWN)
 	semsg(_(e_toomanyarg), "remove()");
     else if ((d = argvars[0].vval.v_dict) != NULL
-	    && !var_check_lock(d->dv_lock, arg_errmsg, TRUE))
+	    && !value_check_lock(d->dv_lock, arg_errmsg, TRUE))
     {
 	key = tv_get_string_chk(&argvars[1]);
 	if (key != NULL)