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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user