# HG changeset patch # User Bram Moolenaar # Date 1429622731 -7200 # Node ID d118a2c541d57499f7b75a10a0a9b61a86ad7cfb # Parent c3ab2c7db150cb5ff1a1d65808688d1ee0278454 patch 7.4.705 Problem: Can't build with Ruby 2.2. Solution: Add #ifdefs to handle the incompatible change. (Andrei Olsen) diff --git a/src/if_ruby.c b/src/if_ruby.c --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -396,7 +396,11 @@ static void (*dll_rb_gc_writebarrier_unp # endif # if defined(RUBY19_OR_LATER) && !defined(PROTO) +# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22 +long rb_num2long_stub(VALUE x) +# else SIGNED_VALUE rb_num2long_stub(VALUE x) +# endif { return dll_rb_num2long(x); } @@ -421,7 +425,11 @@ rb_float_new_in_heap(double d) { return dll_rb_float_new(d); } +# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22 +unsigned long rb_num2ulong(VALUE x) +# else VALUE rb_num2ulong(VALUE x) +# endif { return (long)RSHIFT((SIGNED_VALUE)(x),1); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 705, +/**/ 704, /**/ 703,