To: vim_dev@googlegroups.com Subject: Patch 7.4.2074 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2074 Problem: One more place using a dummy variable. Solution: Use offsetof(). (Ken Takata) Files: src/userfunc.c *** ../vim-7.4.2073/src/userfunc.c 2016-07-17 18:28:59.015697588 +0200 --- src/userfunc.c 2016-07-19 21:19:13.342122555 +0200 *************** *** 58,66 **** #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 HI2UF(hi) HIKEY2UF((hi)->hi_key) #define FUNCARG(fp, j) ((char_u **)(fp->uf_args.ga_data))[j] --- 58,65 ---- #define FC_DICT 4 /* Dict function, uses "self" */ /* From user function to hashitem and back. */ #define UF2HIKEY(fp) ((fp)->uf_name) ! #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] *** ../vim-7.4.2073/src/version.c 2016-07-19 21:05:16.914593641 +0200 --- src/version.c 2016-07-19 21:18:38.750473037 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2074, /**/ -- The question is: What do you do with your life? The wrong answer is: Become the richest guy in the graveyard. (billionaire and Oracle founder Larry Ellison) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///