[vala] Fix temp variable declaration in internal VAPI methods



commit 3f688bcafe42e905de340927dc33e1758a9b7436
Author: Jürg Billeter <j bitron ch>
Date:   Sun Apr 5 22:05:07 2009 +0200

    Fix temp variable declaration in internal VAPI methods
---
 gobject/valaccodemethodmodule.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gobject/valaccodemethodmodule.vala b/gobject/valaccodemethodmodule.vala
index a404a55..a584ebe 100644
--- a/gobject/valaccodemethodmodule.vala
+++ b/gobject/valaccodemethodmodule.vala
@@ -190,6 +190,8 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 		bool old_method_inner_error = current_method_inner_error;
 		bool old_in_creation_method = in_creation_method;
 		int old_next_temp_var_id = next_temp_var_id;
+		var old_temp_vars = temp_vars;
+		var old_temp_ref_vars = temp_ref_vars;
 		var old_variable_name_map = variable_name_map;
 		var old_try = current_try;
 		if (m.parent_symbol is TypeSymbol) {
@@ -200,6 +202,8 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 		current_return_type = m.return_type;
 		current_method_inner_error = false;
 		next_temp_var_id = 0;
+		temp_vars = new ArrayList<LocalVariable> ();
+		temp_ref_vars = new ArrayList<LocalVariable> ();
 		variable_name_map = new HashMap<string,string> (str_hash, str_equal);
 		current_try = null;
 
@@ -296,6 +300,8 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
 		current_return_type = old_return_type;
 		current_method_inner_error = old_method_inner_error;
 		next_temp_var_id = old_next_temp_var_id;
+		temp_vars = old_temp_vars;
+		temp_ref_vars = old_temp_ref_vars;
 		variable_name_map = old_variable_name_map;
 		current_try = old_try;
 



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