]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.227 v7.4.227
authorBram Moolenaar <Bram@vim.org>
Fri, 28 Mar 2014 20:58:21 +0000 (21:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 28 Mar 2014 20:58:21 +0000 (21:58 +0100)
Problem:    Can't build with Ruby 1.8.
Solution:   Do include a check for the Ruby version. (Ken Takata)

src/if_ruby.c
src/version.c

index d8c14c65227cc42807947fc5ea43540250a0baa9..06465bd5a7b2fa86ab621301483936a5c7f911e1 100644 (file)
@@ -88,8 +88,9 @@
 # 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
@@ -202,6 +203,10 @@ static void ruby_vim_init(void);
 # 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
@@ -389,7 +394,8 @@ VALUE rb_int2big_stub(SIGNED_VALUE x)
 {
     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);
index 06cc7f6a303fe7eb77c5979f7069cb96a5e6a22a..1fa43a1d554984cfbcbddf60c425d57e62deddf1 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    227,
 /**/
     226,
 /**/