[vala] codegen: Fix missing _inner_error_ declaration in property accessors



commit 47c4bd10ccec5886a904e1c2466777f884ccc79a
Author: Jürg Billeter <j bitron ch>
Date:   Thu Sep 9 18:05:55 2010 +0200

    codegen: Fix missing _inner_error_ declaration in property accessors

 codegen/valaccodebasemodule.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 4015c00..3f20658 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1553,10 +1553,6 @@ public class Vala.CCodeBaseModule : CodeGenerator {
 				}
 			}
 
-			if (current_method_inner_error) {
-				ccode.add_declaration ("GError *", new CCodeVariableDeclarator.zero ("_inner_error_", new CCodeConstant ("NULL")));
-			}
-
 			if (acc.readable && !returns_real_struct) {
 				// do not declare result variable if exit block is known to be unreachable
 				if (acc.return_block == null || acc.return_block.get_predecessors ().size > 0) {
@@ -1571,6 +1567,10 @@ public class Vala.CCodeBaseModule : CodeGenerator {
 
 			acc.body.emit (this);
 
+			if (current_method_inner_error) {
+				ccode.add_declaration ("GError *", new CCodeVariableDeclarator.zero ("_inner_error_", new CCodeConstant ("NULL")));
+			}
+
 			// notify on property changes
 			if (is_gobject_property (prop) &&
 			    prop.notify &&



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]