3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.227
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.227 (after 7.4.225)
3ef2ca
Problem:    Can't build with Ruby 1.8.
3ef2ca
Solution:   Do include a check for the Ruby version. (Ken Takata)
3ef2ca
Files:	    src/if_ruby.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.226/src/if_ruby.c	2014-03-27 19:08:52.004777244 +0100
3ef2ca
--- src/if_ruby.c	2014-03-28 21:54:06.414253061 +0100
3ef2ca
***************
3ef2ca
*** 88,95 ****
3ef2ca
  # define rb_int2big rb_int2big_stub
3ef2ca
  #endif
3ef2ca
  
3ef2ca
! #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
3ef2ca
! /* Ruby 2.0 defines a number of static functions which use rb_fix2int and
3ef2ca
   * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
3ef2ca
  # define rb_fix2int rb_fix2int_stub
3ef2ca
  # define rb_num2int rb_num2int_stub
3ef2ca
--- 88,96 ----
3ef2ca
  # define rb_int2big rb_int2big_stub
3ef2ca
  #endif
3ef2ca
  
3ef2ca
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
3ef2ca
! 	&& VIM_SIZEOF_INT < VIM_SIZEOF_LONG
3ef2ca
! /* Ruby 1.9 defines a number of static functions which use rb_fix2int and
3ef2ca
   * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */
3ef2ca
  # define rb_fix2int rb_fix2int_stub
3ef2ca
  # define rb_num2int rb_num2int_stub
3ef2ca
***************
3ef2ca
*** 202,207 ****
3ef2ca
--- 203,212 ----
3ef2ca
  # define rb_inspect			dll_rb_inspect
3ef2ca
  # define rb_int2inum			dll_rb_int2inum
3ef2ca
  # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
3ef2ca
+ #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
3ef2ca
+ #   define rb_fix2int			dll_rb_fix2int
3ef2ca
+ #   define rb_num2int			dll_rb_num2int
3ef2ca
+ #  endif
3ef2ca
  #  define rb_num2uint			dll_rb_num2uint
3ef2ca
  # endif
3ef2ca
  # define rb_lastline_get			dll_rb_lastline_get
3ef2ca
***************
3ef2ca
*** 389,395 ****
3ef2ca
  {
3ef2ca
      return dll_rb_int2big(x);
3ef2ca
  }
3ef2ca
! #  if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG
3ef2ca
  long rb_fix2int_stub(VALUE x)
3ef2ca
  {
3ef2ca
      return dll_rb_fix2int(x);
3ef2ca
--- 394,401 ----
3ef2ca
  {
3ef2ca
      return dll_rb_int2big(x);
3ef2ca
  }
3ef2ca
! #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
3ef2ca
! 	&& VIM_SIZEOF_INT < VIM_SIZEOF_LONG
3ef2ca
  long rb_fix2int_stub(VALUE x)
3ef2ca
  {
3ef2ca
      return dll_rb_fix2int(x);
3ef2ca
*** ../vim-7.4.226/src/version.c	2014-03-28 21:49:26.854248777 +0100
3ef2ca
--- src/version.c	2014-03-28 21:53:51.546252833 +0100
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     227,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
No engineer can take a shower without wondering if some sort of Teflon coating
3ef2ca
would make showering unnecessary.
3ef2ca
				(Scott Adams - The Dilbert principle)
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///