comparison src/if_ruby.c @ 19479:bc6c7be92527 v8.2.0297

patch 8.2.0297: compiler warnings for the Ruby interface Commit: https://github.com/vim/vim/commit/8b430b4c1df74bde757a7e5ee0ee2854fdad6472 Author: Bram Moolenaar <Bram@vim.org> 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Feb 2020 15:15:04 +0100
parents 1cae476a7c82
children 4acb165ed0bc
comparison
equal deleted inserted replaced
19478:98e759662690 19479:bc6c7be92527
207 # endif 207 # endif
208 208
209 /* 209 /*
210 * Wrapper defines 210 * Wrapper defines
211 */ 211 */
212 // Ruby 2.7 actually expands the following symbols as macro.
213 # if RUBY_VERSION >= 27
214 # undef rb_define_global_function
215 # undef rb_define_method
216 # undef rb_define_module_function
217 # undef rb_define_singleton_method
218 # endif
219
212 # define rb_assoc_new dll_rb_assoc_new 220 # define rb_assoc_new dll_rb_assoc_new
213 # define rb_cObject (*dll_rb_cObject) 221 # define rb_cObject (*dll_rb_cObject)
214 # define rb_class_new_instance dll_rb_class_new_instance 222 # define rb_class_new_instance dll_rb_class_new_instance
215 # define rb_check_type dll_rb_check_type 223 # define rb_check_type dll_rb_check_type
216 # ifdef USE_TYPEDDATA 224 # ifdef USE_TYPEDDATA
1226 1234
1227 static const rb_data_type_t buffer_type = { 1235 static const rb_data_type_t buffer_type = {
1228 "vim_buffer", 1236 "vim_buffer",
1229 {0, 0, buffer_dsize, 1237 {0, 0, buffer_dsize,
1230 # if RUBY_VERSION >= 27 1238 # if RUBY_VERSION >= 27
1231 0, 0 1239 0, {0}
1232 # else 1240 # else
1233 {0, 0} 1241 {0, 0}
1234 # endif 1242 # endif
1235 }, 1243 },
1236 0, 0, 1244 0, 0,
1506 1514
1507 static const rb_data_type_t window_type = { 1515 static const rb_data_type_t window_type = {
1508 "vim_window", 1516 "vim_window",
1509 {0, 0, window_dsize, 1517 {0, 0, window_dsize,
1510 # if RUBY_VERSION >= 27 1518 # if RUBY_VERSION >= 27
1511 0, 0 1519 0, {0}
1512 # else 1520 # else
1513 {0, 0} 1521 {0, 0}
1514 # endif 1522 # endif
1515 }, 1523 },
1516 0, 0, 1524 0, 0,