]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
D-Bus: Add missing casts for async server methods
authorMikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>
Tue, 15 Jun 2010 19:49:34 +0000 (21:49 +0200)
committerJürg Billeter <j@bitron.ch>
Wed, 16 Jun 2010 18:55:47 +0000 (20:55 +0200)
Fixes bug 621692.

codegen/valadbusservermodule.vala

index 015298535f42c83ac436b3ec72d95eea399d6691..02abc791d544eebe1b91ca2fa3eebcba35057df7 100644 (file)
@@ -171,7 +171,7 @@ public class Vala.DBusServerModule : DBusClientModule {
                CCodeFunctionCall finish_ccall = null;
                if (m.coroutine) {
                        finish_ccall = new CCodeFunctionCall (new CCodeIdentifier (m.get_finish_cname ()));
-                       finish_ccall.add_argument (new CCodeIdentifier ("source_object"));
+                       finish_ccall.add_argument (new CCodeCastExpression (new CCodeIdentifier ("source_object"), sym.get_cname () + "*"));
                        finish_ccall.add_argument (new CCodeIdentifier ("_res_"));
                }
 
@@ -347,7 +347,7 @@ public class Vala.DBusServerModule : DBusClientModule {
                }
 
                if (m.coroutine) {
-                       ccall.add_argument (new CCodeIdentifier (wrapper_name + "_ready"));
+                       ccall.add_argument (new CCodeCastExpression (new CCodeIdentifier (wrapper_name + "_ready"), "GAsyncReadyCallback"));
 
                        var new_call = new CCodeFunctionCall (new CCodeIdentifier ("g_new0"));
                        new_call.add_argument (new CCodeIdentifier ("gpointer"));