Hi list,
I found that Vim cannot be compiled with --enable-rubyinterp=dynamic on 64bit
platform if the Ruby's version is 2.0.0.
I attached a patch to fix it. Please check it.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff -ur vim-7-3-875.orig/src/if_ruby.c vim-7-3-875/src/if_ruby.c
--- vim-7-3-875.orig/src/if_ruby.c 2013-03-22 06:53:50.000000000 +0900
+++ vim-7-3-875/src/if_ruby.c 2013-03-25 03:35:47.871111239 +0900
@@ -88,6 +88,13 @@
# 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 +359,16 @@
{
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)