summaryrefslogtreecommitdiff
path: root/gobject/valaccodegeneratorinvocationexpression.vala
diff options
context:
space:
mode:
Diffstat (limited to 'gobject/valaccodegeneratorinvocationexpression.vala')
-rw-r--r--gobject/valaccodegeneratorinvocationexpression.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/gobject/valaccodegeneratorinvocationexpression.vala b/gobject/valaccodegeneratorinvocationexpression.vala
index 97d952a3f..349766e65 100644
--- a/gobject/valaccodegeneratorinvocationexpression.vala
+++ b/gobject/valaccodegeneratorinvocationexpression.vala
@@ -174,14 +174,16 @@ public class Vala.CCodeGenerator {
var cdecl = new CCodeDeclaration (param.type_reference.get_cname ());
cdecl.add_declarator (new CCodeVariableDeclarator (param.name));
cb_fun.block.add_statement (cdecl);
- cend_call.add_argument (new CCodeIdentifier (param.type_reference.data_type.get_type_id ()));
- cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (param.name)));
if (param.type_reference is ArrayType && ((ArrayType) param.type_reference).element_type.data_type == string_type.data_type) {
// special case string array
+ cend_call.add_argument (new CCodeIdentifier ("G_TYPE_STRV"));
var cstrvlen = new CCodeFunctionCall (new CCodeIdentifier ("g_strv_length"));
cstrvlen.add_argument (new CCodeIdentifier (param.name));
creply_call.add_argument (cstrvlen);
+ } else {
+ cend_call.add_argument (new CCodeIdentifier (param.type_reference.data_type.get_type_id ()));
}
+ cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (param.name)));
creply_call.add_argument (new CCodeIdentifier (param.name));
}
}