Mercurial > vim
diff src/structs.h @ 3687:085f14642fe8 v7.3.603
updated for version 7.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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 16 Jul 2012 17:31:53 +0200 |
parents | e7ff3251dfa1 |
children | dc3efb6d5a08 |
line wrap: on
line diff
--- 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 */ };