From: Juerg Billeter Date: Wed, 23 Apr 2008 20:24:24 +0000 (+0000) Subject: Don't cast out arguments X-Git-Tag: VALA_0_3_2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f3ad567feeb1214c2a69494b9304cc5b6582f2f;p=platform%2Fupstream%2Fvala.git Don't cast out arguments 2008-04-23 Juerg Billeter * gobject/valaccodeinvocationexpressionbinding.vala: Don't cast out arguments svn path=/trunk/; revision=1310 --- diff --git a/ChangeLog b/ChangeLog index 0ab546e..33aa824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-04-23 Jürg Billeter + * gobject/valaccodeinvocationexpressionbinding.vala: + Don't cast out arguments + +2008-04-23 Jürg Billeter + Add support for class constructors, class fields, and class methods, fixes bug 507136 diff --git a/gobject/valaccodeinvocationexpressionbinding.vala b/gobject/valaccodeinvocationexpressionbinding.vala index 0207266..857e28e 100644 --- a/gobject/valaccodeinvocationexpressionbinding.vala +++ b/gobject/valaccodeinvocationexpressionbinding.vala @@ -193,7 +193,10 @@ public class Vala.CCodeInvocationExpressionBinding : CCodeExpressionBinding { carg_map.set (codegen.get_param_pos (param.cdelegate_target_parameter_position), codegen.get_delegate_target_cexpression (arg)); multiple_cargs = true; } - cexpr = codegen.get_implicit_cast_expression (cexpr, arg.static_type, param.type_reference); + if (param.direction == ParameterDirection.IN) { + // don't cast arguments passed by reference + cexpr = codegen.get_implicit_cast_expression (cexpr, arg.static_type, param.type_reference); + } // pass non-simple struct instances always by reference if (!(arg.static_type is NullType) && param.type_reference.data_type is Struct && !((Struct) param.type_reference.data_type).is_simple_type ()) {