]> granicus.if.org Git - vim/commitdiff
patch 7.4.2074 v7.4.2074
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Jul 2016 19:30:13 +0000 (21:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Jul 2016 19:30:13 +0000 (21:30 +0200)
Problem:    One more place using a dummy variable.
Solution:   Use offsetof(). (Ken Takata)

src/userfunc.c
src/version.c

index 67d9c6d5faee07dbd06cc579f8e4877efc701769..ea1542385605e9208f046469a5b591841d3f7d42 100644 (file)
@@ -58,9 +58,8 @@ struct ufunc
 #define FC_DICT            4           /* Dict function, uses "self" */
 
 /* From user function to hashitem and back. */
-static ufunc_T dumuf;
 #define UF2HIKEY(fp) ((fp)->uf_name)
-#define HIKEY2UF(p)  ((ufunc_T *)(p - (dumuf.uf_name - (char_u *)&dumuf)))
+#define HIKEY2UF(p)  ((ufunc_T *)(p - offsetof(ufunc_T, uf_name)))
 #define HI2UF(hi)     HIKEY2UF((hi)->hi_key)
 
 #define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j]
index fe86982ea30618fe2bb9d83edd1b778997c3c5d3..a5f33b18115c50e3820dd85150bf7f47224d472b 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2074,
 /**/
     2073,
 /**/