home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.168 < prev    next >
Encoding:
Internet Message Format  |  2014-02-04  |  2.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.168
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.168
  11. Problem:    Can't compile with Ruby 2.1.0.
  12. Solution:   Add support for new GC. (Kohei Suzuki)
  13. Files:        src/if_ruby.c
  14.  
  15.  
  16. *** ../vim-7.4.167/src/if_ruby.c    2013-05-20 12:47:48.000000000 +0200
  17. --- src/if_ruby.c    2014-02-05 22:35:17.378577243 +0100
  18. ***************
  19. *** 96,101 ****
  20. --- 96,107 ----
  21.   # define rb_num2int rb_num2int_stub
  22.   #endif
  23.   
  24. + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21
  25. + /* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
  26. +  * rb_gc_writebarrier_unprotect_promoted if USE_RGENGC  */
  27. + #  define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
  28. + # endif
  29.   #include <ruby.h>
  30.   #ifdef RUBY19_OR_LATER
  31.   # include <ruby/encoding.h>
  32. ***************
  33. *** 373,378 ****
  34. --- 379,388 ----
  35.   static void* (*ruby_process_options)(int, char**);
  36.   # endif
  37.   
  38. + # if defined(USE_RGENGC) && USE_RGENGC
  39. + static void (*dll_rb_gc_writebarrier_unprotect_promoted)(VALUE);
  40. + # endif
  41.   # if defined(RUBY19_OR_LATER) && !defined(PROTO)
  42.   SIGNED_VALUE rb_num2long_stub(VALUE x)
  43.   {
  44. ***************
  45. *** 406,411 ****
  46. --- 416,428 ----
  47.   #  endif
  48.   # endif
  49.   
  50. + # if defined(USE_RGENGC) && USE_RGENGC
  51. + void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
  52. + {
  53. +     return dll_rb_gc_writebarrier_unprotect_promoted(obj);
  54. + }
  55. + # endif
  56.   static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
  57.   
  58.   /*
  59. ***************
  60. *** 521,526 ****
  61. --- 538,546 ----
  62.   #  endif
  63.       {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
  64.   # endif
  65. + # if defined(USE_RGENGC) && USE_RGENGC
  66. +     {"rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted},
  67. + # endif
  68.       {"", NULL},
  69.   };
  70.   
  71. *** ../vim-7.4.167/src/version.c    2014-02-05 22:25:29.982568243 +0100
  72. --- src/version.c    2014-02-05 22:36:14.010578111 +0100
  73. ***************
  74. *** 740,741 ****
  75. --- 740,743 ----
  76.   {   /* Add new patch number below this line */
  77. + /**/
  78. +     168,
  79.   /**/
  80.  
  81. -- 
  82. hundred-and-one symptoms of being an internet addict:
  83. 10E. You start counting in hex.
  84.  
  85.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  86. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  87. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  88.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  89.