diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-25 15:40:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-25 15:40:50 +0100 |
commit | bee6c0cf86a75faa2aa893f2c9db82fd944a89a5 (patch) | |
tree | f47ec02a587496df83fde0ed7444f233cf85e600 /src | |
parent | 8b20179c657b4266dff115486ca68c6a50324071 (diff) | |
download | vim-git-bee6c0cf86a75faa2aa893f2c9db82fd944a89a5.tar.gz |
patch 7.4.1648v7.4.1648
Problem: Compiler has a problem copying a string into di_key[]. (Yegappan
Lakshmanan)
Solution: Add dictitem16_T.
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 5 | ||||
-rw-r--r-- | src/structs.h | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index db6ef9d5d..770879661 100644 --- a/src/eval.c +++ b/src/eval.c @@ -292,13 +292,12 @@ typedef struct #define VV_RO 2 /* read-only */ #define VV_RO_SBX 4 /* read-only in the sandbox */ -#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}}, {0} +#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}} static struct vimvar { char *vv_name; /* name of variable, without v: */ - dictitem_T vv_di; /* value and name for key */ - char vv_filler[16]; /* space for LONGEST name below!!! */ + dictitem16_T vv_di; /* value and name for key (max 16 chars!) */ char vv_flags; /* VV_COMPAT, VV_RO, VV_RO_SBX */ } vimvars[VV_LEN] = { diff --git a/src/structs.h b/src/structs.h index 97eae57be..abfe6cd78 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1221,6 +1221,15 @@ struct dictitem_S }; typedef struct dictitem_S dictitem_T; +/* A dictitem with a 16 character key (plus NUL). */ +struct dictitem16_S +{ + typval_T di_tv; /* type and value of the variable */ + char_u di_flags; /* flags (only used for variable) */ + char_u di_key[17]; /* key */ +}; +typedef struct dictitem16_S dictitem16_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: no :unlet or remove() */ diff --git a/src/version.c b/src/version.c index 95e2cba56..c929eaff8 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1648, +/**/ 1647, /**/ 1646, |