[vala] Support calling async methods with varargs
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Support calling async methods with varargs
- Date: Thu, 9 May 2013 20:04:14 +0000 (UTC)
commit c5383d51a5b442871b08e19f5d5faf63587516cf
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 cf02d60..1909fb4 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -879,8 +879,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);
}
}
@@ -897,6 +900,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]