From: Frederik 'playya' Sdun Date: Fri, 28 Jan 2011 14:43:34 +0000 (+0100) Subject: Add support for async signal handlers X-Git-Tag: 0.11.7~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fkeep-around%2Fbfcbc0b26c94f8c61f91bd41dc23290536cc9dd9;p=thirdparty%2Fvala.git Add support for async signal handlers Fixes bug 602594. --- diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala index fcf8bcc1f..cef921928 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 b56744bc7..ede77a388 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; }