From: Jürg Billeter Date: Wed, 15 Sep 2010 18:39:38 +0000 (+0200) Subject: girparser: Fix detection of asynchronous methods X-Git-Tag: 0.11.0~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7e3a4553905b04a96b7b9cfb94792d5dfa0be9b;p=thirdparty%2Fvala.git girparser: Fix detection of asynchronous methods --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index f1730deee..11405599a 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -1165,8 +1165,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);