0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2018-06-12 22:05:14 +02:00
parent 83f4cbd973
commit ffa9684150
8 changed files with 86 additions and 89 deletions

View File

@@ -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);
}