patch 8.1.0053: first argument of 'completefunc' has inconsistent type
Problem: The first argument given to 'completefunc' can be Number or
String, depending on the value.
Solution: Avoid guessing the type of an argument, use typval_T in the
callers of call_vim_function(). (Ozaki Kiichi, closes #2993)
diff --git a/src/mbyte.c b/src/mbyte.c
index b797835..545a40d 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4795,12 +4795,11 @@
static void
call_imactivatefunc(int active)
{
- char_u *argv[1];
+ typval_T argv[2];
- if (active)
- argv[0] = (char_u *)"1";
- else
- argv[0] = (char_u *)"0";
+ argv[0].v_type = VAR_NUMBER;
+ argv[0].vval.v_number = active ? 1 : 0;
+ argv[1].v_type = VAR_NUMBER;
(void)call_func_retnr(p_imaf, 1, argv, FALSE);
}