summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-01-31 19:19:04 +0000
committerBram Moolenaar <Bram@vim.org>2005-01-31 19:19:04 +0000
commit2ce06f6eb9a10bbbf1b3a0abf9f8c1bb71311e54 (patch)
tree6dc3e7795458f6ab29244cf926d32ece9b1f696d /src/structs.h
parentb23c33872aa46de39bdc2cd2cbded697afa6ad08 (diff)
downloadvim-git-2ce06f6eb9a10bbbf1b3a0abf9f8c1bb71311e54.tar.gz
updated for version 7.0046
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/structs.h b/src/structs.h
index 6482e30c8..9d7bc9205 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -963,7 +963,8 @@ typedef struct dictvar_S dict_T;
*/
typedef struct
{
- char v_type; /* see below: VAR_NUMBER, VAR_STRING, etc. */
+ char v_type; /* see below: VAR_NUMBER, VAR_STRING, etc. */
+ char v_lock; /* see below: VAR_LOCKED, VAR_FIXED */
union
{
varnumber_T v_number; /* number value */
@@ -981,6 +982,10 @@ typedef struct
#define VAR_LIST 4 /* "v_list" is used */
#define VAR_DICT 5 /* "v_dict" is used */
+/* Values for "v_lock". */
+#define VAR_LOCKED 1 /* locked with lock(), can use unlock() */
+#define VAR_FIXED 2 /* locked forever */
+
/*
* Structure to hold an item of a list: an internal variable without a name.
*/
@@ -1013,6 +1018,7 @@ struct listvar_S
listitem_T *lv_first; /* first item, NULL if none */
listitem_T *lv_last; /* last item, NULL if none */
listwatch_T *lv_watch; /* first watcher, NULL if none */
+ char lv_lock; /* zero, VAR_LOCKED, VAR_FIXED */
};
/*
@@ -1032,6 +1038,7 @@ 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 */
/*
* Structure to hold info about a Dictionary.
@@ -1040,6 +1047,7 @@ struct dictvar_S
{
int dv_refcount; /* reference count */
hashtab_T dv_hashtab; /* hashtab that refers to the items */
+ char dv_lock; /* zero, VAR_LOCKED, VAR_FIXED */
};