1
0
forked from aniani/vim

patch 8.1.1800: function call functions have too many arguments

Problem:    Function call functions have too many arguments.
Solution:   Pass values in a funcexe_T struct.
This commit is contained in:
Bram Moolenaar
2019-08-03 18:17:11 +02:00
parent 749fa0af85
commit c6538bcc1c
12 changed files with 134 additions and 112 deletions

View File

@@ -110,15 +110,13 @@ create_timer(long msec, int repeat)
timer_callback(timer_T *timer)
{
typval_T rettv;
int dummy;
typval_T argv[2];
argv[0].v_type = VAR_NUMBER;
argv[0].vval.v_number = (varnumber_T)timer->tr_id;
argv[1].v_type = VAR_UNKNOWN;
call_callback(&timer->tr_callback, -1,
&rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
call_callback(&timer->tr_callback, -1, &rettv, 1, argv);
clear_tv(&rettv);
}