1
0
forked from aniani/vim

patch 7.4.2074

Problem:    One more place using a dummy variable.
Solution:   Use offsetof(). (Ken Takata)
This commit is contained in:
Bram Moolenaar
2016-07-19 21:30:13 +02:00
parent 68015bbd84
commit 0a0f641b98
2 changed files with 3 additions and 2 deletions

View 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]

View File

@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2074,
/**/
2073,
/**/