From: Jürg Billeter Date: Sat, 25 Oct 2008 18:41:00 +0000 (+0000) Subject: Next attempt to correct parameter positions for instance and error X-Git-Tag: VALA_0_5_1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a92a74cb46a40faf48f4902e2b976e9c99103fd;p=thirdparty%2Fvala.git Next attempt to correct parameter positions for instance and error 2008-10-25 Jürg Billeter * vala/valadelegate.vala: * gobject/valaccodegenerator.vala: * gobject/valaccodeinvocationexpressionmodule.vala: Next attempt to correct parameter positions for instance and error parameters in delegate wrappers svn path=/trunk/; revision=1928 --- diff --git a/ChangeLog b/ChangeLog index e05ab7a82..89a747ff1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-25 Jürg Billeter + + * vala/valadelegate.vala: + * gobject/valaccodegenerator.vala: + * gobject/valaccodeinvocationexpressionmodule.vala: + + Next attempt to correct parameter positions for instance and + error parameters in delegate wrappers + 2008-10-25 Ali Sabil * vapi/glib-2.0.vapi: diff --git a/gobject/valaccodegenerator.vala b/gobject/valaccodegenerator.vala index fa99eed6d..ad1774dc8 100644 --- a/gobject/valaccodegenerator.vala +++ b/gobject/valaccodegenerator.vala @@ -3925,7 +3925,7 @@ public class Vala.CCodeGenerator : CodeGenerator { if (m.get_error_types ().size > 0) { var cparam = new CCodeFormalParameter ("error", "GError**"); - cparam_map.set (get_param_pos (-2), cparam); + cparam_map.set (get_param_pos (-1), cparam); } // append C parameters in the right order diff --git a/gobject/valaccodeinvocationexpressionmodule.vala b/gobject/valaccodeinvocationexpressionmodule.vala index 2b044cf51..23fcf1b19 100644 --- a/gobject/valaccodeinvocationexpressionmodule.vala +++ b/gobject/valaccodeinvocationexpressionmodule.vala @@ -366,7 +366,7 @@ public class Vala.CCodeInvocationExpressionModule : CCodeModule { // method can fail codegen.current_method_inner_error = true; // add &inner_error before the ellipsis arguments - carg_map.set (codegen.get_param_pos (-2), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("inner_error"))); + carg_map.set (codegen.get_param_pos (-1), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("inner_error"))); } if (ellipsis) { diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index 281ef0a3f..fdf949f8a 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -100,7 +100,8 @@ public class Vala.Delegate : TypeSymbol { this.return_type = return_type; this.source_reference = source_reference; - cinstance_parameter_position = -1; + // error is -1 (right of user_data) + cinstance_parameter_position = -2; carray_length_parameter_position = -3; cdelegate_target_parameter_position = -3; }