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

index ab15a87de69cd8a12cefde93b733dfb985f01a53..a09653e34bfd4f13a36252951f5fd5048290ae2c 100644 (file)
@@ -4367,11 +4367,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, cexpr);
                                } else {
                                        // if cexpr is e.g. a function call, we can't take the address of the expression
-                                       var temp_var = get_temp_variable (type, true, null, false);
-                                       emit_temp_var (temp_var);
-
-                                       ccode.add_assignment (get_variable_cexpression (temp_var.name), cexpr);
-                                       return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_var.name));
+                                       var temp_value = create_temp_value (type, false, arg);
+                                       ccode.add_assignment (get_cvalue_ (temp_value), cexpr);
+                                       return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue_ (temp_value));
                                }
                        }
                }