[vala/wip/transform: 71/72] Support calling async methods with varargs
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 71/72] Support calling async methods with varargs
- Date: Tue, 7 May 2013 20:08:03 +0000 (UTC)
commit 87a361fdcc2c7e1552d633d0d5951fbcfd199959
Author: Luca Bruno <lucabru src gnome org>
Date: Sun May 5 21:30:03 2013 +0200
Support calling async methods with varargs
vala/valamethod.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 7177e8d..acdee23 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -907,8 +907,11 @@ public class Vala.Method : Subroutine {
var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
var params = new ArrayList<Parameter> ();
+ Parameter ellipsis = null;
foreach (var param in parameters) {
- if (param.direction == ParameterDirection.IN) {
+ if (param.ellipsis) {
+ ellipsis = param;
+ } else if (param.direction == ParameterDirection.IN) {
params.add (param);
}
}
@@ -925,6 +928,10 @@ public class Vala.Method : Subroutine {
params.add (callback_param);
+ if (ellipsis != null) {
+ params.add (ellipsis);
+ }
+
return params;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]