From: Ryan Lortie Date: Wed, 4 Aug 2010 18:02:43 +0000 (+0200) Subject: Don't emit extra temp variables in array dup funcs X-Git-Tag: 0.9.5~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0fdbda9edf1298d921e29036e912ecb47226d91;p=thirdparty%2Fvala.git Don't emit extra temp variables in array dup funcs Reset the temp variables list back to empty at the start of emitting the array dup function and restore it at the end. --- diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala index bec474c5b..5d429e027 100644 --- a/codegen/valaccodearraymodule.vala +++ b/codegen/valaccodearraymodule.vala @@ -798,6 +798,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { var old_symbol = current_symbol; var old_temp_vars = temp_vars; current_symbol = null; + temp_vars = new ArrayList (); var cdecl = new CCodeDeclaration (array_type.get_cname ()); var cvardecl = new CCodeVariableDeclarator ("result"); @@ -879,6 +880,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { var old_symbol = current_symbol; var old_temp_vars = temp_vars; current_symbol = null; + temp_vars = new ArrayList (); var idx_decl = new CCodeDeclaration ("int"); idx_decl.add_declarator (new CCodeVariableDeclarator ("i"));