From: Jürg Billeter Date: Mon, 8 Dec 2008 23:20:28 +0000 (+0000) Subject: Fix inline struct methods in VAPI files X-Git-Tag: VALA_0_5_3~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3195bf25546bc1593570f451669adc3b000605be;p=thirdparty%2Fvala.git Fix inline struct methods in VAPI files 2008-12-09 Jürg Billeter * gobject/valaccodemethodmodule.vala: Fix inline struct methods in VAPI files svn path=/trunk/; revision=2124 --- diff --git a/ChangeLog b/ChangeLog index 0bfce5dff..9b640f91b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-09 Jürg Billeter + + * gobject/valaccodemethodmodule.vala: + + Fix inline struct methods in VAPI files + 2008-12-07 Thijs Vermeir * vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata: diff --git a/gobject/valaccodemethodmodule.vala b/gobject/valaccodemethodmodule.vala index 575bd261b..b531f1657 100644 --- a/gobject/valaccodemethodmodule.vala +++ b/gobject/valaccodemethodmodule.vala @@ -56,10 +56,15 @@ public class Vala.CCodeMethodModule : CCodeStructModule { } public override void visit_method (Method m) { + var old_type_symbol = current_type_symbol; + var old_symbol = current_symbol; Method old_method = current_method; DataType old_return_type = current_return_type; bool old_method_inner_error = current_method_inner_error; int old_next_temp_var_id = next_temp_var_id; + if (m.parent_symbol is TypeSymbol) { + current_type_symbol = (TypeSymbol) m.parent_symbol; + } current_symbol = m; current_method = m; current_return_type = m.return_type; @@ -147,7 +152,8 @@ public class Vala.CCodeMethodModule : CCodeStructModule { bool inner_error = current_method_inner_error; - current_symbol = current_symbol.parent_symbol; + current_type_symbol = old_type_symbol; + current_symbol = old_symbol; current_method = old_method; current_return_type = old_return_type; current_method_inner_error = old_method_inner_error;