diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-04-21 15:25:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-04-21 15:25:31 +0200 |
commit | bbc1a592a0e0efd5101a58032e7e7cc9f3e9f417 (patch) | |
tree | c7d6e8cebca677f5e748153a752e13d94ded368c /src/if_ruby.c | |
parent | d82a2a990bc329754e1b61c5af669c76ac202497 (diff) | |
download | vim-git-bbc1a592a0e0efd5101a58032e7e7cc9f3e9f417.tar.gz |
patch 7.4.705v7.4.705
Problem: Can't build with Ruby 2.2.
Solution: Add #ifdefs to handle the incompatible change. (Andrei Olsen)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r-- | src/if_ruby.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c index 3b9f47661..3767bf334 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -396,7 +396,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); } @@ -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); } |