]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix missing _inner_error_ declaration in constructors
authorJürg Billeter <j@bitron.ch>
Mon, 20 Sep 2010 16:04:03 +0000 (18:04 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 20 Sep 2010 16:04:03 +0000 (18:04 +0200)
codegen/valagobjectmodule.vala

index d181108116158e916c3aa36c6d69caa9726ddc7b..ed52d8530aee10deb5c2646b3f25b43fc5b19114 100644 (file)
@@ -459,6 +459,8 @@ public class Vala.GObjectModule : GTypeModule {
                        ccode.add_declaration ("%s *".printf (cl.get_cname ()), new CCodeVariableDeclarator ("self"));
                        ccode.add_expression (new CCodeAssignment (new CCodeIdentifier ("self"), ccall));
 
+                       c.body.emit (this);
+
                        if (current_method_inner_error) {
                                /* always separate error parameter and inner_error local variable
                                 * as error may be set to NULL but we're always interested in inner errors
@@ -466,9 +468,6 @@ public class Vala.GObjectModule : GTypeModule {
                                ccode.add_declaration ("GError *", new CCodeVariableDeclarator.zero ("_inner_error_", new CCodeConstant ("NULL")));
                        }
 
-
-                       c.body.emit (this);
-               
                        ccode.add_return (new CCodeIdentifier ("obj"));
 
                        pop_function ();