From ffa9684150f5441e84d492e7184ef73587bd6c6c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 12 Jun 2018 22:05:14 +0200 Subject: 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) --- src/mbyte.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mbyte.c') diff --git a/src/mbyte.c b/src/mbyte.c index b79783527..545a40db0 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4795,12 +4795,11 @@ iconv_end(void) 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); } -- cgit v1.2.1