// use wrapper as source_object wouldn't be correct otherwise
ccall.add_argument (new CCodeIdentifier (generate_async_callback_wrapper ()));
var res_wrapper = new CCodeFunctionCall (new CCodeIdentifier ("g_simple_async_result_new"));
- res_wrapper.add_argument (new CCodeIdentifier ("self"));
+ res_wrapper.add_argument (new CCodeCastExpression (new CCodeIdentifier ("self"), "GObject *"));
res_wrapper.add_argument (new CCodeIdentifier ("_callback_"));
res_wrapper.add_argument (new CCodeIdentifier ("_user_data_"));
res_wrapper.add_argument (new CCodeConstant ("NULL"));
// unwrap async result
var inner_res = new CCodeFunctionCall (new CCodeIdentifier ("g_simple_async_result_get_op_res_gpointer"));
- inner_res.add_argument (new CCodeIdentifier ("_res_"));
+ inner_res.add_argument (new CCodeCastExpression (new CCodeIdentifier ("_res_"), "GSimpleAsyncResult *"));
ccall.add_argument (inner_res);
ccall.add_argument (new CCodeConstant ("error"));
} else {
function.add_parameter (new CCodeParameter ("source_object", "GObject *"));
function.add_parameter (new CCodeParameter ("_res_", "GAsyncResult *"));
- function.add_parameter (new CCodeParameter ("_user_data_", "gpointer *"));
+ function.add_parameter (new CCodeParameter ("_user_data_", "gpointer"));
}
push_function (function);