Mercurial > vim
comparison src/ex_cmds2.c @ 17606:ff097edaae89 v8.1.1800
patch 8.1.1800: function call functions have too many arguments
commit https://github.com/vim/vim/commit/c6538bcc1cdd1fb83732f22fdc69bd9bb66f968a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 3 18:17:11 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 03 Aug 2019 18:30:07 +0200 |
parents | 892b4ea3bad6 |
children | 4a3dca734d36 |
comparison
equal
deleted
inserted
replaced
17605:bb1b495f4e05 | 17606:ff097edaae89 |
---|---|
108 */ | 108 */ |
109 static void | 109 static void |
110 timer_callback(timer_T *timer) | 110 timer_callback(timer_T *timer) |
111 { | 111 { |
112 typval_T rettv; | 112 typval_T rettv; |
113 int dummy; | |
114 typval_T argv[2]; | 113 typval_T argv[2]; |
115 | 114 |
116 argv[0].v_type = VAR_NUMBER; | 115 argv[0].v_type = VAR_NUMBER; |
117 argv[0].vval.v_number = (varnumber_T)timer->tr_id; | 116 argv[0].vval.v_number = (varnumber_T)timer->tr_id; |
118 argv[1].v_type = VAR_UNKNOWN; | 117 argv[1].v_type = VAR_UNKNOWN; |
119 | 118 |
120 call_callback(&timer->tr_callback, -1, | 119 call_callback(&timer->tr_callback, -1, &rettv, 1, argv); |
121 &rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE, NULL); | |
122 clear_tv(&rettv); | 120 clear_tv(&rettv); |
123 } | 121 } |
124 | 122 |
125 /* | 123 /* |
126 * Call timers that are due. | 124 * Call timers that are due. |