patch 8.0.0345: islocked('d.changedtick') does not work
Problem: islocked('d.changedtick') does not work.
Solution: Make it work.
diff --git a/src/eval.c b/src/eval.c
index b835af8..c4154d0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1811,6 +1811,7 @@
*
* flags:
* GLV_QUIET: do not give error messages
+ * GLV_READ_ONLY: will not change the variable
* GLV_NO_AUTOLOAD: do not use script autoloading
*
* Returns a pointer to just after the name, including indexes.
@@ -2078,7 +2079,8 @@
break;
}
/* existing variable, need to check if it can be changed */
- else if (var_check_ro(lp->ll_di->di_flags, name, FALSE))
+ else if ((flags & GLV_READ_ONLY) == 0
+ && var_check_ro(lp->ll_di->di_flags, name, FALSE))
{
clear_tv(&var1);
return NULL;