# HG changeset patch # User Bram Moolenaar # Date 1582380904 -3600 # Node ID bc6c7be9252766821b77af9442f6ad39f7328259 # Parent 98e75966269067a5b554189c08b833816d48ed23 patch 8.2.0297: compiler warnings for the Ruby interface Commit: https://github.com/vim/vim/commit/8b430b4c1df74bde757a7e5ee0ee2854fdad6472 Author: Bram Moolenaar Date: Sat Feb 22 15:01:00 2020 +0100 patch 8.2.0297: compiler warnings for the Ruby interface Problem: Compiler warnings for the Ruby interface. Solution: Undefine a few macros, fix initialization. (Ozaki Kiichi, closes #5677) diff --git a/src/if_ruby.c b/src/if_ruby.c --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -209,6 +209,14 @@ static int ruby_convert_to_vim_value(VAL /* * Wrapper defines */ +// Ruby 2.7 actually expands the following symbols as macro. +# if RUBY_VERSION >= 27 +# undef rb_define_global_function +# undef rb_define_method +# undef rb_define_module_function +# undef rb_define_singleton_method +# endif + # define rb_assoc_new dll_rb_assoc_new # define rb_cObject (*dll_rb_cObject) # define rb_class_new_instance dll_rb_class_new_instance @@ -1228,7 +1236,7 @@ static const rb_data_type_t buffer_type "vim_buffer", {0, 0, buffer_dsize, # if RUBY_VERSION >= 27 - 0, 0 + 0, {0} # else {0, 0} # endif @@ -1508,7 +1516,7 @@ static const rb_data_type_t window_type "vim_window", {0, 0, window_dsize, # if RUBY_VERSION >= 27 - 0, 0 + 0, {0} # else {0, 0} # endif diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 297, +/**/ 296, /**/ 295,