]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix inline struct methods in VAPI files
authorJürg Billeter <j@bitron.ch>
Mon, 8 Dec 2008 23:20:28 +0000 (23:20 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 8 Dec 2008 23:20:28 +0000 (23:20 +0000)
2008-12-09  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodemethodmodule.vala:

Fix inline struct methods in VAPI files

svn path=/trunk/; revision=2124

ChangeLog
gobject/valaccodemethodmodule.vala

index 0bfce5dff6afbc75e4378feb3175c2d9a47d06d2..9b640f91b35bf1767cc567d00dd1d6427724ee45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-09  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodemethodmodule.vala:
+
+       Fix inline struct methods in VAPI files
+
 2008-12-07  Thijs Vermeir  <thijsvermeir@gmail.com>
 
        * vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata:
index 575bd261ba8fe873c77eb4dc6f1b8def880af0f6..b531f165752dcf2db12e3d6d2b063904169bac8a 100644 (file)
@@ -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;