]> granicus.if.org Git - vim/commitdiff
patch 7.4.1648 v7.4.1648
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Mar 2016 14:40:50 +0000 (15:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Mar 2016 14:40:50 +0000 (15:40 +0100)
Problem:    Compiler has a problem copying a string into di_key[]. (Yegappan
            Lakshmanan)
Solution:   Add dictitem16_T.

src/eval.c
src/structs.h
src/version.c

index db6ef9d5d874ada7ca82d5bc95f6f565b59948ea..770879661cd08fdf348e868def8e1eeb435f7ed9 100644 (file)
@@ -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] =
 {
index 97eae57be3723391a352864d0af480f2e4cb580d..abfe6cd781c9ee3b551e5ca79cc5ab64c80a1c05 100644 (file)
@@ -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() */
index 95e2cba565b5ae31eda8ca132c50c27b30ee476f..c929eaff800b8d150bc8c6a0ac1a97ae5674cb4f 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1648,
 /**/
     1647,
 /**/