]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix out arguments to vararg methods
authorJürg Billeter <j@bitron.ch>
Mon, 18 Oct 2010 21:01:46 +0000 (23:01 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 18 Oct 2010 21:01:46 +0000 (23:01 +0200)
codegen/valaccodemethodcallmodule.vala

index e6010302bda537d2dfabd64332b2f289765c3933..2fb9f6a4b1e74956dac249e7181b05aea084415f 100644 (file)
@@ -756,7 +756,16 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                        set_cvalue (expr, temp_ref);
                }
 
+               params_it = params.iterator ();
                foreach (Expression arg in expr.get_argument_list ()) {
+                       if (params_it.next ()) {
+                               var param = params_it.get ();
+                               if (param.params_array || param.ellipsis) {
+                                       // ignore ellipsis arguments as we currently don't use temporary variables for them
+                                       break;
+                               }
+                       }
+
                        var unary = arg as UnaryExpression;
                        if (unary == null || unary.operator != UnaryOperator.OUT) {
                                continue;