summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-07-16 17:31:53 +0200
committerBram Moolenaar <Bram@vim.org>2012-07-16 17:31:53 +0200
commitbdb620560b3199828f9852e9c9453d56e951a5f9 (patch)
tree3901feff854f6353d8f82127f936289ba5a73cf6 /src/structs.h
parentc2ece10274c01c50534bfdcd4d8a03229356101d (diff)
downloadvim-git-bdb620560b3199828f9852e9c9453d56e951a5f9.tar.gz
updated for version 7.3.603v7.3.603
Problem: It is possible to add replace builtin functions by calling extend() on g:. Solution: Add a flag to a dict to indicate it is a scope. Check for existing functions. (ZyX)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index abcb7045d..36440c3c2 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1106,6 +1106,11 @@ typedef struct
#define VAR_DICT 5 /* "v_dict" is used */
#define VAR_FLOAT 6 /* "v_float" is used */
+/* Values for "dv_scope". */
+#define VAR_SCOPE 1 /* a:, v:, s:, etc. scope dictionaries */
+#define VAR_DEF_SCOPE 2 /* l:, g: scope dictionaries: here funcrefs are not
+ allowed to mask existing functions */
+
/* Values for "v_lock". */
#define VAR_LOCKED 1 /* locked with lock(), can use unlock() */
#define VAR_FIXED 2 /* locked forever */
@@ -1181,6 +1186,7 @@ struct dictvar_S
int dv_copyID; /* ID used by deepcopy() */
dict_T *dv_copydict; /* copied dict used by deepcopy() */
char dv_lock; /* zero, VAR_LOCKED, VAR_FIXED */
+ char dv_scope; /* zero, VAR_SCOPE, VAR_DEF_SCOPE */
dict_T *dv_used_next; /* next dict in used dicts list */
dict_T *dv_used_prev; /* previous dict in used dicts list */
};