summaryrefslogtreecommitdiffstats
path: root/src/if_ruby.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-03-07 15:16:21 +0100
committerBram Moolenaar <Bram@vim.org>2013-03-07 15:16:21 +0100
commitdb3fbe5228025b7f87702e74cfbbb5acf01c7c39 (patch)
tree1dab5620094b8a49921d4b9b50f2572ab00cef9d /src/if_ruby.c
parent4e3c70d241842d3129d4c4d480c60910029d56af (diff)
updated for version 7.3.848v7.3.848
Problem: Can't build with Ruby 2.0 when using MinGW x64 or MSVC10. Solution: Fix it. Also detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64. (Ken Takata)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r--src/if_ruby.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 818aacbfc7..d810d3770b 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -39,6 +39,9 @@
*/
# define rb_cFalseClass (*dll_rb_cFalseClass)
# define rb_cFixnum (*dll_rb_cFixnum)
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+# define rb_cFloat (*dll_rb_cFloat)
+# endif
# define rb_cNilClass (*dll_rb_cNilClass)
# define rb_cSymbol (*dll_rb_cSymbol)
# define rb_cTrueClass (*dll_rb_cTrueClass)
@@ -249,6 +252,9 @@ static void ruby_vim_init(void);
static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
VALUE *dll_rb_cFalseClass;
VALUE *dll_rb_cFixnum;
+#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+VALUE *dll_rb_cFloat;
+#endif
VALUE *dll_rb_cNilClass;
static VALUE *dll_rb_cObject;
VALUE *dll_rb_cSymbol;
@@ -352,7 +358,7 @@ rb_float_new_in_heap(double d)
{
return dll_rb_float_new(d);
}
-unsigned long rb_num2ulong(VALUE x)
+VALUE rb_num2ulong(VALUE x)
{
return (long)RSHIFT((SIGNED_VALUE)(x),1);
}
@@ -373,6 +379,9 @@ static struct
{"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new},
{"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass},
{"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum},
+#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+ {"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat},
+#endif
{"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
{"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
{"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},