From: Mikkel Kamstrup Erlandsen Date: Tue, 15 Jun 2010 19:49:34 +0000 (+0200) Subject: D-Bus: Add missing casts for async server methods X-Git-Tag: 0.9.2~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7631c005ed21609a04fec882271e8ae7f5ab1372;p=thirdparty%2Fvala.git D-Bus: Add missing casts for async server methods Fixes bug 621692. --- diff --git a/codegen/valadbusservermodule.vala b/codegen/valadbusservermodule.vala index 015298535..02abc791d 100644 --- a/codegen/valadbusservermodule.vala +++ b/codegen/valadbusservermodule.vala @@ -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"));