0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.4.168

Problem:    Can't compile with Ruby 2.1.0.
Solution:   Add support for new GC. (Kohei Suzuki)
This commit is contained in:
Bram Moolenaar
2014-02-05 22:41:15 +01:00
parent 4f943c09a5
commit a1a118b159
2 changed files with 22 additions and 0 deletions

View File

@@ -96,6 +96,12 @@
# define rb_num2int rb_num2int_stub # define rb_num2int rb_num2int_stub
#endif #endif
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21
/* Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
* rb_gc_writebarrier_unprotect_promoted if USE_RGENGC */
# define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
# endif
#include <ruby.h> #include <ruby.h>
#ifdef RUBY19_OR_LATER #ifdef RUBY19_OR_LATER
# include <ruby/encoding.h> # include <ruby/encoding.h>
@@ -373,6 +379,10 @@ static VALUE (*dll_rb_require) (const char*);
static void* (*ruby_process_options)(int, char**); static void* (*ruby_process_options)(int, char**);
# endif # endif
# if defined(USE_RGENGC) && USE_RGENGC
static void (*dll_rb_gc_writebarrier_unprotect_promoted)(VALUE);
# endif
# if defined(RUBY19_OR_LATER) && !defined(PROTO) # if defined(RUBY19_OR_LATER) && !defined(PROTO)
SIGNED_VALUE rb_num2long_stub(VALUE x) SIGNED_VALUE rb_num2long_stub(VALUE x)
{ {
@@ -406,6 +416,13 @@ VALUE rb_num2ulong(VALUE x)
# endif # endif
# endif # endif
# if defined(USE_RGENGC) && USE_RGENGC
void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
{
return dll_rb_gc_writebarrier_unprotect_promoted(obj);
}
# endif
static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */ static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
/* /*
@@ -520,6 +537,9 @@ static struct
{"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp}, {"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
# endif # endif
{"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
# endif
# if defined(USE_RGENGC) && USE_RGENGC
{"rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted},
# endif # endif
{"", NULL}, {"", NULL},
}; };

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
168,
/**/ /**/
167, 167,
/**/ /**/