diff src/if_ruby.c @ 15543:dd725a8ab112 v8.1.0779

patch 8.1.0779: argument for message functions is inconsistent commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 19 17:43:09 2019 +0100 patch 8.1.0779: argument for message functions is inconsistent Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *".
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Jan 2019 17:45:07 +0100
parents 55ccc2d353bd
children ef9c89680e7f
line wrap: on
line diff
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -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 UNUS
 	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, 
 	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];