jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.570

073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.570
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.570
073263
Problem:    Building with dynamic library does not work for Ruby 2.2.0
073263
Solution:   Change #ifdefs and #defines. (Ken Takata)
073263
Files:	    src/if_ruby.c
073263
073263
073263
*** ../vim-7.4.569/src/if_ruby.c	2014-11-27 17:44:05.376820913 +0100
073263
--- src/if_ruby.c	2015-01-14 14:02:59.680115042 +0100
073263
***************
073263
*** 96,106 ****
073263
  # define rb_num2int rb_num2int_stub
073263
  #endif
073263
  
073263
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21
073263
  /* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
073263
   * rb_gc_writebarrier_unprotect_promoted if USE_RGENGC  */
073263
  # define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
073263
  #endif
073263
  
073263
  #include <ruby.h>
073263
  #ifdef RUBY19_OR_LATER
073263
--- 96,110 ----
073263
  # define rb_num2int rb_num2int_stub
073263
  #endif
073263
  
073263
! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
073263
  /* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
073263
   * rb_gc_writebarrier_unprotect_promoted if USE_RGENGC  */
073263
  # define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
073263
  #endif
073263
+ #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
073263
+ # define rb_gc_writebarrier_unprotect rb_gc_writebarrier_unprotect_stub
073263
+ # define rb_check_type rb_check_type_stub
073263
+ #endif
073263
  
073263
  #include <ruby.h>
073263
  #ifdef RUBY19_OR_LATER
073263
***************
073263
*** 180,186 ****
073263
   */
073263
  # define rb_assoc_new			dll_rb_assoc_new
073263
  # define rb_cObject			(*dll_rb_cObject)
073263
! # define rb_check_type			dll_rb_check_type
073263
  # define rb_class_path			dll_rb_class_path
073263
  # define rb_data_object_alloc		dll_rb_data_object_alloc
073263
  # define rb_define_class_under		dll_rb_define_class_under
073263
--- 184,192 ----
073263
   */
073263
  # define rb_assoc_new			dll_rb_assoc_new
073263
  # define rb_cObject			(*dll_rb_cObject)
073263
! # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 22
073263
! #  define rb_check_type			dll_rb_check_type
073263
! # endif
073263
  # define rb_class_path			dll_rb_class_path
073263
  # define rb_data_object_alloc		dll_rb_data_object_alloc
073263
  # define rb_define_class_under		dll_rb_define_class_under
073263
***************
073263
*** 382,388 ****
073263
--- 388,398 ----
073263
  # endif
073263
  
073263
  # if defined(USE_RGENGC) && USE_RGENGC
073263
+ #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
073263
  static void (*dll_rb_gc_writebarrier_unprotect_promoted)(VALUE);
073263
+ #  else
073263
+ static void (*dll_rb_gc_writebarrier_unprotect)(VALUE obj);
073263
+ #  endif
073263
  # endif
073263
  
073263
  # if defined(RUBY19_OR_LATER) && !defined(PROTO)
073263
***************
073263
*** 420,429 ****
073263
--- 430,453 ----
073263
  
073263
     /* Do not generate a prototype here, VALUE isn't always defined. */
073263
  # if defined(USE_RGENGC) && USE_RGENGC && !defined(PROTO)
073263
+ #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
073263
  void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
073263
  {
073263
      dll_rb_gc_writebarrier_unprotect_promoted(obj);
073263
  }
073263
+ #  else
073263
+ void rb_gc_writebarrier_unprotect_stub(VALUE obj)
073263
+ {
073263
+     dll_rb_gc_writebarrier_unprotect(obj);
073263
+ }
073263
+ #  endif
073263
+ # endif
073263
+ 
073263
+ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
073263
+ void rb_check_type_stub(VALUE v, int i)
073263
+ {
073263
+     dll_rb_check_type(v, i);
073263
+ }
073263
  # endif
073263
  
073263
  static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
073263
***************
073263
*** 542,548 ****
073263
--- 566,576 ----
073263
      {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
073263
  # endif
073263
  # if defined(USE_RGENGC) && USE_RGENGC
073263
+ #  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER == 21
073263
      {"rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted},
073263
+ #  else
073263
+     {"rb_gc_writebarrier_unprotect", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect},
073263
+ #  endif
073263
  # endif
073263
      {"", NULL},
073263
  };
073263
*** ../vim-7.4.569/src/version.c	2015-01-14 12:44:38.407422077 +0100
073263
--- src/version.c	2015-01-14 14:02:53.868178396 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     570,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
89. In addition to your e-mail address being on your business
073263
    cards you even have your own domain.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///