[vala] codegen: Fix missing _inner_error_ declaration in constructors
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix missing _inner_error_ declaration in constructors
- Date: Mon, 20 Sep 2010 16:05:04 +0000 (UTC)
commit 553650229cbf6c584a1d21b75f2e077c1b9ab33c
Author: Jürg Billeter <j bitron ch>
Date: Mon Sep 20 18:04:03 2010 +0200
codegen: Fix missing _inner_error_ declaration in constructors
codegen/valagobjectmodule.vala | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index d181108..ed52d85 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]