Merge pull request #16986 from neikeq/issue-16983

Mono: Fix bindings for parameters in vararg methods
This commit is contained in:
Ignacio Etcheverry 2018-02-24 20:06:41 +01:00 committed by GitHub
commit 71602c7491
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1528,9 +1528,9 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte
if (p_imethod.is_vararg) {
if (i < p_imethod.arguments.size() - 1) {
c_in_statements += sformat(arg_type->c_in.size() ? arg_type->c_in : TypeInterface::DEFAULT_VARARG_C_IN, "Variant", c_param_name);
c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(0, ";
c_in_statements += sformat("&%s_in", c_param_name);
c_in_statements += ");\n";
c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(";
c_in_statements += itos(i);
c_in_statements += sformat(", &%s_in);\n", c_param_name);
}
} else {
if (i > 0)