Patch 8.2.2448
Problem:    Compilation error with Ruby 3.0.
Solution:   Adjust #ifdefs and declaration. (Ken Takata, closes #7761)
Files:      src/if_ruby.c


*** ../vim-8.2.2447/src/if_ruby.c       2021-01-08 19:31:35.956060245 +0100
--- src/if_ruby.c       2021-02-01 19:29:22.374054526 +0100
***************
*** 436,442 ****
  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
  static long (*dll_rb_fix2int) (VALUE);
  static long (*dll_rb_num2int) (VALUE);
  static unsigned long (*dll_rb_num2uint) (VALUE);
--- 436,442 ----
  static VALUE (*dll_rb_inspect) (VALUE);
  static VALUE (*dll_rb_int2inum) (long);
  static ID (*dll_rb_intern) (const char*);
! # 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,530 ****
--- 524,534 ----
  # 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,560 ****
  {
      return dll_rb_int2big(x);
  }
! #   if VIM_SIZEOF_INT < VIM_SIZEOF_LONG
      long
  rb_fix2int_stub(VALUE x)
  {
--- 558,564 ----
  {
      return dll_rb_int2big(x);
  }
! #   if RUBY_VERSION >= 30 || VIM_SIZEOF_INT < VIM_SIZEOF_LONG
      long
  rb_fix2int_stub(VALUE x)
  {
***************
*** 612,624 ****
  {
      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)
  {
--- 616,626 ----
***************
*** 695,701 ****
      {"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
      {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
      {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
      {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
--- 697,703 ----
      {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
      {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
      {"rb_intern", (RUBY_PROC*)&dll_rb_intern},
! # 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},
*** ../vim-8.2.2447/src/version.c       2021-02-01 19:24:52.066907936 +0100
--- src/version.c       2021-02-01 19:30:31.665834154 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2448,
  /**/

-- 
>From "know your smileys":
 (\___/)
 (+'.'+)    Bunny
 (")_(")

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202102011832.111IWQTG1295594%40masaka.moolenaar.net.

Raspunde prin e-mail lui