0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0779: argument for message functions is inconsistent

Problem:    Argument for message functions is inconsistent.
Solution:   Make first argument to msg() "char *".
This commit is contained in:
Bram Moolenaar
2019-01-19 17:43:09 +01:00
parent d383c92ec1
commit 32526b3c18
56 changed files with 679 additions and 698 deletions

View File

@@ -1057,11 +1057,11 @@ static void error_print(int state)
# ifdef RUBY21_OR_LATER
bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0);
for (i = 0; i < RARRAY_LEN(bt); i++)
msg_attr((char_u *)RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
msg_attr(RSTRING_PTR(RARRAY_AREF(bt, i)), attr);
# else
bt = rb_funcall2(error, rb_intern("backtrace"), 0, 0);
for (i = 0; i < RARRAY_LEN(bt); i++)
msg_attr((char_u *)RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
msg_attr(RSTRING_PTR(RARRAY_PTR(bt)[i]), attr);
# endif
break;
default:
@@ -1083,11 +1083,11 @@ static VALUE vim_message(VALUE self UNUSED, VALUE str)
strcpy(buff, RSTRING_PTR(str));
p = strchr(buff, '\n');
if (p) *p = '\0';
MSG(buff);
msg(buff);
}
else
{
MSG("");
msg("");
}
return Qnil;
}
@@ -1641,7 +1641,7 @@ static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
if (i > 0) rb_str_cat(str, ", ", 2);
rb_str_concat(str, rb_inspect(argv[i]));
}
MSG(RSTRING_PTR(str));
msg(RSTRING_PTR(str));
if (argc == 1)
ret = argv[0];