]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Use create_temp_value in store_property
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 14 Jun 2011 09:59:40 +0000 (11:59 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 6 Jul 2011 20:32:33 +0000 (22:32 +0200)
codegen/valaccodebasemodule.vala

index cfcb5a46d94ad153812510de3450898fd5c9ae67..12361b696065c6400c90e1e31a68d660d613a4cc 100644 (file)
@@ -5322,11 +5322,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        // if instance is e.g. a function call, we can't take the address of the expression
                                        // (tmp = expr, &tmp)
 
-                                       var temp_var = get_temp_variable (instance.target_type, true, null, false);
-                                       emit_temp_var (temp_var);
-                                       ccode.add_assignment (get_variable_cexpression (temp_var.name), cinstance);
-
-                                       cinstance = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_var.name));
+                                       var temp_value = create_temp_value (instance.target_type, false, instance);
+                                       store_value (temp_value, instance.target_value);
+                                       cinstance = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue_ (temp_value));
                                }
                        }