[vala] GAsync: Fix result parameter in .end
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] GAsync: Fix result parameter in .end
- Date: Thu, 17 Sep 2009 21:38:14 +0000 (UTC)
commit 98af2b050acc56de49cd1fd8e077cad8356296ae
Author: Jürg Billeter <j bitron ch>
Date: Thu Sep 17 23:37:43 2009 +0200
GAsync: Fix result parameter in .end
vala/valamethod.vala | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 05b7893..5f60a2c 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -1009,23 +1009,21 @@ public class Vala.Method : Member {
public Gee.List<FormalParameter> get_async_end_parameters () {
assert (this.coroutine);
- var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
-
var params = new ArrayList<FormalParameter> ();
- foreach (var param in parameters) {
- if (param.direction == ParameterDirection.OUT) {
- params.add (param);
- }
- }
+ var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
var result_type = new ObjectType ((ObjectTypeSymbol) glib_ns.scope.lookup ("AsyncResult"));
var result_param = new FormalParameter ("_res_", result_type);
- result_param.default_expression = new NullLiteral (source_reference);
result_param.cparameter_position = 0.1;
-
params.add (result_param);
+ foreach (var param in parameters) {
+ if (param.direction == ParameterDirection.OUT) {
+ params.add (param);
+ }
+ }
+
return params;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]