Mercurial > vim
comparison src/change.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 | ae11ab022b02 |
children | 0f7ae8010787 |
comparison
equal
deleted
inserted
replaced
17605:bb1b495f4e05 | 17606:ff097edaae89 |
---|---|
339 void | 339 void |
340 invoke_listeners(buf_T *buf) | 340 invoke_listeners(buf_T *buf) |
341 { | 341 { |
342 listener_T *lnr; | 342 listener_T *lnr; |
343 typval_T rettv; | 343 typval_T rettv; |
344 int dummy; | |
345 typval_T argv[6]; | 344 typval_T argv[6]; |
346 listitem_T *li; | 345 listitem_T *li; |
347 linenr_T start = MAXLNUM; | 346 linenr_T start = MAXLNUM; |
348 linenr_T end = 0; | 347 linenr_T end = 0; |
349 linenr_T added = 0; | 348 linenr_T added = 0; |
387 argv[4].vval.v_list = buf->b_recorded_changes; | 386 argv[4].vval.v_list = buf->b_recorded_changes; |
388 ++textlock; | 387 ++textlock; |
389 | 388 |
390 for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next) | 389 for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next) |
391 { | 390 { |
392 call_callback(&lnr->lr_callback, -1, &rettv, | 391 call_callback(&lnr->lr_callback, -1, &rettv, 5, argv); |
393 5, argv, NULL, 0L, 0L, &dummy, TRUE, NULL); | |
394 clear_tv(&rettv); | 392 clear_tv(&rettv); |
395 } | 393 } |
396 | 394 |
397 --textlock; | 395 --textlock; |
398 list_unref(buf->b_recorded_changes); | 396 list_unref(buf->b_recorded_changes); |