mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0246: MSVC: deprecation warnings with Ruby
Problem: MSVC: deprecation warnings with Ruby. Solution: Move _CRT_SECURE_NO_DEPRECATE to build file. (Ken Takata, closes #5622)
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
# if !defined(DYNAMIC_RUBY) || (RUBY_VERSION < 18)
|
||||
# define NT
|
||||
# define NT
|
||||
# endif
|
||||
# ifndef DYNAMIC_RUBY
|
||||
# define IMPORT // For static dll usage __declspec(dllimport)
|
||||
@@ -300,8 +300,8 @@ static int ruby_convert_to_vim_value(VALUE val, typval_T *rettv);
|
||||
# define rb_float_new dll_rb_float_new
|
||||
# define rb_ary_new dll_rb_ary_new
|
||||
# ifdef rb_ary_new4
|
||||
# define RB_ARY_NEW4_MACRO 1
|
||||
# undef rb_ary_new4
|
||||
# define RB_ARY_NEW4_MACRO 1
|
||||
# undef rb_ary_new4
|
||||
# endif
|
||||
# define rb_ary_new4 dll_rb_ary_new4
|
||||
# define rb_ary_push dll_rb_ary_push
|
||||
@@ -1071,15 +1071,15 @@ error_print(int state)
|
||||
}
|
||||
|
||||
attr = syn_name2attr((char_u *)"Error");
|
||||
# if RUBY_VERSION >= 21
|
||||
#if RUBY_VERSION >= 21
|
||||
bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0);
|
||||
for (i = 0; i < RARRAY_LEN(bt); i++)
|
||||
msg_attr(RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
|
||||
# else
|
||||
#else
|
||||
bt = rb_funcall2(error, rb_intern("backtrace"), 0, 0);
|
||||
for (i = 0; i < RARRAY_LEN(bt); i++)
|
||||
msg_attr(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
|
||||
# endif
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state);
|
||||
|
Reference in New Issue
Block a user