c++ warning in generated bindings
walters at verbum.org
Fri Jul 8 06:12:04 EST 2005
On Thu, 2005-07-07 at 13:07 -0700, Ryan Gammon wrote:
> Ross Burton wrote:
> >static inline gboolean
> >BookFactory_get_book_async (DBusGProxy *proxy, const char * IN_source, BookFactory_get_book_reply callback, gpointer userdata)
> > DBusGAsyncData *stuff;
> > stuff = g_new (DBusGAsyncData, 1);
> > stuff->cb = callback;
> > stuff->userdata = userdata;
> > dbus_g_proxy_begin_call (proxy, "getBook", BookFactory_get_book_async_callback, stuff, g_free, G_TYPE_STRING, IN_source, G_TYPE_INVALID);
> > return TRUE;
> Hi guys, on the topic of the binding tool,
> stuff->cb = callback;
> ... is problematic for c++
> warning: invalid
> conversion from `void (*)(char*, GError*, void*)' to `void*'
> Would it be reasonable here to explicitly cast the callback to a
> (gpointer) here?
> stuff->cb = (gpointer) callback;
Yeah; the async stuff should probably be using the GCallback type and
the G_CALLBACK() cast macro.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050707/a1839965/attachment.pgp
More information about the dbus