[vala] Fix out arguments to vararg methods
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix out arguments to vararg methods
- Date: Mon, 18 Oct 2010 21:02:28 +0000 (UTC)
commit 97781696321776cff8e54c7661cf0e573c745b96
Author: Jürg Billeter <j bitron ch>
Date: Mon Oct 18 23:01:46 2010 +0200
Fix out arguments to vararg methods
codegen/valaccodemethodcallmodule.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index e601030..2fb9f6a 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]