From bfcbc0b26c94f8c61f91bd41dc23290536cc9dd9 Mon Sep 17 00:00:00 2001 From: Frederik 'playya' Sdun Date: Fri, 28 Jan 2011 15:43:34 +0100 Subject: [PATCH] Add support for async signal handlers Fixes bug 602594. --- codegen/valaccodedelegatemodule.vala | 4 ++++ vala/valadelegate.vala | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala index fcf8bcc1..cef92192 100644 --- a/codegen/valaccodedelegatemodule.vala +++ b/codegen/valaccodedelegatemodule.vala @@ -392,6 +392,10 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule { last_pos = min_pos; } + if (m.coroutine) { + ccall.add_argument (new CCodeConstant ("NULL")); + ccall.add_argument (new CCodeConstant ("NULL")); + } var block = new CCodeBlock (); if (m.return_type is VoidType || m.return_type.is_real_non_null_struct_type ()) { block.add_statement (new CCodeExpressionStatement (ccall)); diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index b56744bc..ede77a38 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -157,7 +157,7 @@ public class Vala.Delegate : TypeSymbol { * @return true if the specified method is compatible to this callback */ public bool matches_method (Method m, DataType dt) { - if (m.coroutine) { + if (m.coroutine && !(parent_symbol is Signal)) { // async delegates are not yet supported return false; } -- 2.11.4.GIT