0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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

@@ -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()
*/