[vala/wip/emitlocal: 16/17] codegen: Drop useless get_temp_variable usage in visit_regex_literal



commit ab2cf5f05a9c1f68280dd547de79cd123d5c39cb
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Jun 14 13:03:44 2011 +0200

    codegen: Drop useless get_temp_variable usage in visit_regex_literal

 codegen/valaccodebasemodule.vala |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 725abb6..4e254d6 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3529,12 +3529,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 			flags += " | G_REGEX_EXTENDED";
 		}
 
-		var regex_var = get_temp_variable (regex_type, true, expr, false);
-		emit_temp_var (regex_var);
-
 		var cdecl = new CCodeDeclaration ("GRegex*");
 
-		var cname = regex_var.name + "regex_" + next_regex_id.to_string ();
+		var cname = "_tmp_regex_%d".printf (next_regex_id);
 		if (this.next_regex_id == 0) {
 			var fun = new CCodeFunction ("_thread_safe_regex_init", "GRegex*");
 			fun.modifiers = CCodeModifiers.STATIC | CCodeModifiers.INLINE;



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