patch 9.0.0476: varargs does not work for replacement function of substitute()
Problem: Varargs does not work for replacement function of substitute().
Solution: Check the varargs flag of the function. (closes #11142)
diff --git a/src/structs.h b/src/structs.h
index 581b22e..be08f0a 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -2052,13 +2052,13 @@
// Struct passed between functions dealing with function call execution.
//
-// "argv_func", when not NULL, can be used to fill in arguments only when the
+// "fe_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, partial_argcount,
-// called_func_argcount)
+// new_argcount = fe_argv_func(current_argcount, argv, partial_argcount,
+// called_func)
//
typedef struct {
- int (* fe_argv_func)(int, typval_T *, int, int);
+ int (* fe_argv_func)(int, typval_T *, int, ufunc_T *);
linenr_T fe_firstline; // first line of range
linenr_T fe_lastline; // last line of range
int *fe_doesrange; // if not NULL: return: function handled range