Mercurial > vim
diff src/structs.h @ 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 | d5e5d0fc3fa8 |
children | efad8e4860d8 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -1517,6 +1517,22 @@ struct funccall_S // "func" }; +// Struct passed between functions dealing with function call execution. +// +// "argv_func", when not NULL, can be used to fill in arguments only when the +// invoked function uses them. It is called like this: +// new_argcount = argv_func(current_argcount, argv, called_func_argcount) +// +typedef struct { + int (* argv_func)(int, typval_T *, int); + linenr_T firstline; // first line of range + linenr_T lastline; // last line of range + int *doesrange; // if not NULL: return: function handled range + int evaluate; // actually evaluate expressions + partial_T *partial; // for extra arguments + dict_T *selfdict; // Dictionary for "self" +} funcexe_T; + /* * Struct used by trans_function_name() */