# define rb_int2big rb_int2big_stub
#endif
-#if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
-/* Ruby 2.0 defines a number of static functions which use rb_fix2int and
+#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+/* Ruby 1.9 defines a number of static functions which use rb_fix2int and
* rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
# define rb_fix2int rb_fix2int_stub
# define rb_num2int rb_num2int_stub
# define rb_inspect dll_rb_inspect
# define rb_int2inum dll_rb_int2inum
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+# define rb_fix2int dll_rb_fix2int
+# define rb_num2int dll_rb_num2int
+# endif
# define rb_num2uint dll_rb_num2uint
# endif
# define rb_lastline_get dll_rb_lastline_get
{
return dll_rb_int2big(x);
}
-# if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
long rb_fix2int_stub(VALUE x)
{
return dll_rb_fix2int(x);