Mono/C#: Fix bindings generator with void vararg methods
Commit 4d727f1ee6
made it possible for vararg
methods to return void. This broke the C# bindings generator which was
assuming in one place that vararg methods always return Variant.
This commit is contained in:
parent
1c88ee6c96
commit
f3aa793ba3
|
@ -2066,9 +2066,11 @@ Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInte
|
||||||
p_output.append(p_imethod.arguments.size() ? C_LOCAL_PTRCALL_ARGS ".ptr()" : "NULL");
|
p_output.append(p_imethod.arguments.size() ? C_LOCAL_PTRCALL_ARGS ".ptr()" : "NULL");
|
||||||
p_output.append(", total_length, vcall_error);\n");
|
p_output.append(", total_length, vcall_error);\n");
|
||||||
|
|
||||||
// See the comment on the C_LOCAL_VARARG_RET declaration
|
if (!ret_void) {
|
||||||
if (return_type->cname != name_cache.type_Variant) {
|
// See the comment on the C_LOCAL_VARARG_RET declaration
|
||||||
p_output.append("\t" C_LOCAL_RET " = " C_LOCAL_VARARG_RET ";\n");
|
if (return_type->cname != name_cache.type_Variant) {
|
||||||
|
p_output.append("\t" C_LOCAL_RET " = " C_LOCAL_VARARG_RET ";\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
p_output.append("\t" CS_PARAM_METHODBIND "->ptrcall(" CS_PARAM_INSTANCE ", ");
|
p_output.append("\t" CS_PARAM_METHODBIND "->ptrcall(" CS_PARAM_INSTANCE ", ");
|
||||||
|
|
Loading…
Reference in New Issue