summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-04-14 16:19:03 +0200
committerBram Moolenaar <bram@vim.org>2013-04-14 16:19:03 +0200
commit7916ff0f68e146d62ee36cf8d023909a44d585af (patch)
tree9d856e4e8d3cb91ba061eb3923c1b44aee549c3e
parent3e045b8518ce41b76a8aa229144b6c58ddf2a926 (diff)
downloadvim-7916ff0f68e146d62ee36cf8d023909a44d585af.tar.gz
updated for version 7.3.889v7.3.889v7-3-889
Problem: Can't build with Ruby 2.0 on a 64 bit system. Solution: Define rb_fix2int and rb_num2int. (Kohei Suzuki)
-rw-r--r--src/if_ruby.c19
-rw-r--r--src/version.c2
2 files changed, 21 insertions, 0 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index d810d377..51429585 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 <ruby.h>
#ifdef RUBY19_OR_LATER
# include <ruby/encoding.h>
@@ -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)
diff --git a/src/version.c b/src/version.c
index bc16d2b2..f9adcbb1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 889,
+/**/
888,
/**/
887,