]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add support for async signal handlers bfcbc0b26c94f8c61f91bd41dc23290536cc9dd9
authorFrederik 'playya' Sdun <Frederik.Sdun@googlemail.com>
Fri, 28 Jan 2011 14:43:34 +0000 (15:43 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 1 Mar 2011 07:45:09 +0000 (08:45 +0100)
Fixes bug 602594.

codegen/valaccodedelegatemodule.vala
vala/valadelegate.vala

index fcf8bcc1f88b41b7764bb0ed86d3e0ed42da8f40..cef9219288cec6d14f2f4e3aee44123bd57e3df2 100644 (file)
@@ -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));
index b56744bc7bad899ea3fb81bf052b8db0c3d8db0e..ede77a38888733db6ee0f32b8e2d5c20d963a580 100644 (file)
@@ -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;
                }