From f7cf48461fe85d582e4c9263574cc7f859bdb949 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 21 Apr 2015 15:25:40 +0200 Subject: [PATCH] patch 7.4.705 Problem: Can't build with Ruby 2.2. Solution: Add #ifdefs to handle the incompatible change. (Andrei Olsen) --- src/if_ruby.c | 8 ++++++++ src/version.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/if_ruby.c b/src/if_ruby.c index 4edee1cd65..34d900f397 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -404,7 +404,11 @@ static void (*dll_rb_gc_writebarrier_unprotect)(VALUE obj); # 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); } @@ -429,7 +433,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 index 985c88e467..b830535ef1 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 705, /**/ 704, /**/