2008-04-23 Juerg Billeter <j@bitron.ch>
* gobject/valaccodeinvocationexpressionbinding.vala:
Don't cast out arguments
svn path=/trunk/; revision=1310
2008-04-23 Jürg Billeter <j@bitron.ch>
+ * gobject/valaccodeinvocationexpressionbinding.vala:
+ Don't cast out arguments
+
+2008-04-23 Jürg Billeter <j@bitron.ch>
+
Add support for class constructors, class fields, and class
methods, fixes bug 507136
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 ()) {