Patch 7.3.834
Problem:    Ruby 2.0 has a few API changes.
Solution:   Add handling of Ruby 2.0. (Yasuhiro Matsumoto)
Files:      src/if_ruby.c


*** ../vim-7.3.833/src/if_ruby.c        2013-02-14 22:19:47.000000000 +0100
--- src/if_ruby.c       2013-02-26 13:41:24.000000000 +0100
***************
*** 189,195 ****
--- 189,197 ----
  #ifndef RUBY19_OR_LATER
  #define rb_num2long                   dll_rb_num2long
  #endif
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 19
  #define rb_num2ulong                  dll_rb_num2ulong
+ #endif
  #define rb_obj_alloc                  dll_rb_obj_alloc
  #define rb_obj_as_string              dll_rb_obj_as_string
  #define rb_obj_id                     dll_rb_obj_id
***************
*** 344,349 ****
--- 346,362 ----
  {
      return dll_rb_int2big(x);
  }
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
+ VALUE
+ rb_float_new_in_heap(double d)
+ {
+     return dll_rb_float_new(d);
+ }
+ unsigned long rb_num2ulong(VALUE x)
+ {
+     return (long)RSHIFT((SIGNED_VALUE)(x),1);
+ }
+ #endif
  #endif
  
  static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
***************
*** 434,440 ****
--- 447,457 ----
  #endif
  #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
      {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
+ # if DYNAMIC_RUBY_VER <= 19
      {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
+ # else
+     {"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new},
+ # endif
      {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
      {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
  #endif
*** ../vim-7.3.833/src/version.c        2013-02-26 13:30:28.000000000 +0100
--- src/version.c       2013-02-26 13:33:34.000000000 +0100
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     834,
  /**/

-- 
An alien life briefly visits earth.  Just before departing it leaves a
message in the dust on the back of a white van.  The world is shocked
and wants to know what it means.  After months of studies the worlds
best linguistic scientists are able to decipher the message: "Wash me!".

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.


Raspunde prin e-mail lui