patch 7.4.698
Problem: Various problems with locked and fixed lists and dictionaries.
Solution: Disallow changing locked items, fix a crash, add tests. (Olaf
Dabrunz)
diff --git a/src/structs.h b/src/structs.h
index 3b24eec..fedd3b9 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1203,10 +1203,11 @@
typedef struct dictitem_S dictitem_T;
-#define DI_FLAGS_RO 1 /* "di_flags" value: read-only variable */
-#define DI_FLAGS_RO_SBX 2 /* "di_flags" value: read-only in the sandbox */
-#define DI_FLAGS_FIX 4 /* "di_flags" value: fixed variable, not allocated */
-#define DI_FLAGS_LOCK 8 /* "di_flags" value: locked variable */
+#define DI_FLAGS_RO 1 /* "di_flags" value: read-only variable */
+#define DI_FLAGS_RO_SBX 2 /* "di_flags" value: read-only in the sandbox */
+#define DI_FLAGS_FIX 4 /* "di_flags" value: fixed: no :unlet or remove() */
+#define DI_FLAGS_LOCK 8 /* "di_flags" value: locked variable */
+#define DI_FLAGS_ALLOC 16 /* "di_flags" value: separately allocated */
/*
* Structure to hold info about a Dictionary.