diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-01 19:31:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-01 19:31:47 +0100 |
commit | 9d20daffc296b9eb901fb14bdd83620ea55d440a (patch) | |
tree | 5f839334b260d0ea390b141da26f7886ae2dc9fc | |
parent | f9547eb6ef02e305203b859d2dcfdae930b9d544 (diff) | |
download | vim-git-9d20daffc296b9eb901fb14bdd83620ea55d440a.tar.gz |
patch 8.2.2448: compilation error with Ruby 3.0v8.2.2448
Problem: Compilation error with Ruby 3.0.
Solution: Adjust #ifdefs and declaration. (Ken Takata, closes #7761)
-rw-r--r-- | src/if_ruby.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c index a8c8379b6..1d49d671e 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -436,7 +436,7 @@ static VALUE (*dll_rb_hash_new) (void); static VALUE (*dll_rb_inspect) (VALUE); static VALUE (*dll_rb_int2inum) (long); static ID (*dll_rb_intern) (const char*); -# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG // 64 bits only +# if RUBY_VERSION >= 30 || VIM_SIZEOF_INT < VIM_SIZEOF_LONG static long (*dll_rb_fix2int) (VALUE); static long (*dll_rb_num2int) (VALUE); static unsigned long (*dll_rb_num2uint) (VALUE); @@ -524,7 +524,11 @@ static void (*dll_rb_gc_writebarrier_unprotect)(VALUE obj); # endif # if RUBY_VERSION >= 30 +# ifdef _MSC_VER +static void (*dll_ruby_malloc_size_overflow)(size_t, size_t); +# else NORETURN(static void (*dll_ruby_malloc_size_overflow)(size_t, size_t)); +# endif # endif # if RUBY_VERSION >= 26 @@ -554,7 +558,7 @@ rb_int2big_stub(SIGNED_VALUE x) { return dll_rb_int2big(x); } -# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG +# if RUBY_VERSION >= 30 || VIM_SIZEOF_INT < VIM_SIZEOF_LONG long rb_fix2int_stub(VALUE x) { @@ -612,13 +616,11 @@ rb_check_type_stub(VALUE obj, int t) { dll_rb_check_type(obj, t); } -# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG // 64 bits only unsigned long rb_num2uint_stub(VALUE x) { return dll_rb_num2uint(x); } -# endif void ruby_malloc_size_overflow_stub(size_t x, size_t y) { @@ -695,7 +697,7 @@ static struct {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, -# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG // 64 bits only +# if RUBY_VERSION >= 30 || VIM_SIZEOF_INT < VIM_SIZEOF_LONG {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int}, {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint}, diff --git a/src/version.c b/src/version.c index 61acfadd4..5a8993360 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2448, +/**/ 2447, /**/ 2446, |