diff --git a/src/gtk/webview_webkit2.cpp b/src/gtk/webview_webkit2.cpp index f2e67d3202..958dcc39b9 100644 --- a/src/gtk/webview_webkit2.cpp +++ b/src/gtk/webview_webkit2.cpp @@ -801,11 +801,15 @@ wxString wxWebViewWebKit::GetCurrentTitle() const } -static void wxgtk_web_resource_get_data_cb(WebKitWebResource *, +extern "C" { +static void wxgtk_web_resource_get_data_cb(GObject*, GAsyncResult *res, - GAsyncResult **res_out) + void* user_data) { - *res_out = (GAsyncResult*)g_object_ref(res); + GAsyncResult** res_out = static_cast(user_data); + g_object_ref(res); + *res_out = res; +} } wxString wxWebViewWebKit::GetPageSource() const @@ -818,7 +822,7 @@ wxString wxWebViewWebKit::GetPageSource() const GAsyncResult *result = NULL; webkit_web_resource_get_data(resource, NULL, - (GAsyncReadyCallback)wxgtk_web_resource_get_data_cb, + wxgtk_web_resource_get_data_cb, &result); GMainContext *main_context = g_main_context_get_thread_default();