]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use create_temp_value in struct initializer
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 11 Jun 2011 09:01:09 +0000 (11:01 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 6 Jul 2011 20:32:31 +0000 (22:32 +0200)
codegen/valaccodebasemodule.vala

index ca3b915a50072d88c792404919afa38b95eefe97..13da64b612f0344ea271539d5b73b30c6e9bb508 100644 (file)
@@ -2211,10 +2211,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                set_cvalue (list, clist);
                        } else {
                                // used as expression
-                               var temp_decl = get_temp_variable (list.target_type, false, list);
-                               emit_temp_var (temp_decl);
-
-                               var instance = get_local_cvalue (temp_decl);
+                               var instance = create_temp_value (list.target_type, true, list);
 
                                var field_it = st.get_fields ().iterator ();
                                foreach (Expression expr in list.get_initializers ()) {