From 0bcdd6e70932cf689a6a49f514d7b893468b492d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 14 Apr 2013 16:19:03 +0200 Subject: updated for version 7.3.889 Problem: Can't build with Ruby 2.0 on a 64 bit system. Solution: Define rb_fix2int and rb_num2int. (Kohei Suzuki) --- src/if_ruby.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/if_ruby.c') diff --git a/src/if_ruby.c b/src/if_ruby.c index d810d3770..514295850 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -88,6 +88,14 @@ # define rb_int2big rb_int2big_stub #endif +#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ + && SIZEOF_INT < SIZEOF_LONG +/* Ruby 2.0 defines a number of static functions which use rb_fix2int and + * rb_num2int if SIZEOF_INT < SIZEOF_LONG (64bit) */ +# define rb_fix2int rb_fix2int_stub +# define rb_num2int rb_num2int_stub +#endif + #include #ifdef RUBY19_OR_LATER # include @@ -352,6 +360,17 @@ VALUE rb_int2big_stub(SIGNED_VALUE x) { return dll_rb_int2big(x); } +#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \ + && SIZEOF_INT < SIZEOF_LONG +long rb_fix2int_stub(VALUE x) +{ + return dll_rb_fix2int(x); +} +long rb_num2int_stub(VALUE x) +{ + return dll_rb_num2int(x); +} +#endif #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 VALUE rb_float_new_in_heap(double d) -- cgit v1.2.1