To: vim_dev@googlegroups.com Subject: Patch 8.1.0609 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0609 Problem: MS-Windows: unused variable, depending on the Ruby version. Solution: Put ruby_sysinit and NtInitialize inside #ifdef and make them consistent. (Ken Takata) Files: src/if_ruby.c *** ../vim-8.1.0608/src/if_ruby.c 2018-09-13 17:26:31.091401618 +0200 --- src/if_ruby.c 2018-12-19 20:45:35.033529992 +0100 *************** *** 326,333 **** # define ruby_init dll_ruby_init # define ruby_init_loadpath dll_ruby_init_loadpath # ifdef WIN3264 ! # define NtInitialize dll_NtInitialize ! # define ruby_sysinit dll_ruby_sysinit # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 # define rb_w32_snprintf dll_rb_w32_snprintf # endif --- 326,336 ---- # define ruby_init dll_ruby_init # define ruby_init_loadpath dll_ruby_init_loadpath # ifdef WIN3264 ! # ifdef RUBY19_OR_LATER ! # define ruby_sysinit dll_ruby_sysinit ! # else ! # define NtInitialize dll_NtInitialize ! # endif # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 # define rb_w32_snprintf dll_rb_w32_snprintf # endif *************** *** 437,444 **** static void (*dll_ruby_init) (void); static void (*dll_ruby_init_loadpath) (void); # ifdef WIN3264 ! static void (*dll_NtInitialize) (int*, char***); static void (*dll_ruby_sysinit) (int*, char***); # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); # endif --- 440,450 ---- static void (*dll_ruby_init) (void); static void (*dll_ruby_init_loadpath) (void); # ifdef WIN3264 ! # ifdef RUBY19_OR_LATER static void (*dll_ruby_sysinit) (int*, char***); + # else + static void (*dll_NtInitialize) (int*, char***); + # endif # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...); # endif *************** *** 637,646 **** {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, # ifdef WIN3264 ! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19 ! {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, ! # else {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit}, # endif # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, --- 643,652 ---- {"ruby_init", (RUBY_PROC*)&dll_ruby_init}, {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath}, # ifdef WIN3264 ! # ifdef RUBY19_OR_LATER {"ruby_sysinit", (RUBY_PROC*)&dll_ruby_sysinit}, + # else + {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize}, # endif # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf}, *** ../vim-8.1.0608/src/version.c 2018-12-18 22:04:01.264228261 +0100 --- src/version.c 2018-12-19 20:47:03.188835058 +0100 *************** *** 801,802 **** --- 801,804 ---- { /* Add new patch number below this line */ + /**/ + 609, /**/ -- Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Cha-Chu. But I think it's Colin. /// 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 ///