[vala/0.10] girparser: Fix detection of asynchronous methods
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10] girparser: Fix detection of asynchronous methods
- Date: Wed, 15 Sep 2010 21:07:46 +0000 (UTC)
commit 06a948c7ad5ec65ba36c172d12aef2394e30143e
Author: Jürg Billeter <j bitron ch>
Date: Wed Sep 15 20:39:38 2010 +0200
girparser: Fix detection of asynchronous methods
vala/valagirparser.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index edb4d2f..53cb317 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1166,8 +1166,12 @@ public class Vala.GirParser : CodeVisitor {
var info = new MethodInfo(param, array_length_idx, closure_idx, destroy_idx);
if (s is Method && scope == "async") {
- ((Method) s).coroutine = true;
- info.keep = false;
+ var unresolved_type = param.variable_type as UnresolvedType;
+ if (unresolved_type != null && unresolved_type.unresolved_symbol.name == "AsyncReadyCallback") {
+ // GAsync-style method
+ ((Method) s).coroutine = true;
+ info.keep = false;
+ }
}
parameters.add (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]