g_bus_watch_proxy and introspection



Hi,

was giving a try at using GDBus from PyGI and found a showstopper right away.

g_bus_watch_proxy gets passed two callbacks and has a single user_data
and GDestroyNotify for both.

guint               g_bus_watch_proxy                   (GBusType bus_type,
                                                         const gchar *name,

GBusNameWatcherFlags flags,
                                                         const gchar
*object_path,
                                                         const gchar
*interface_name,
                                                         GType interface_type,

GDBusProxyFlags proxy_flags,

GBusProxyAppearedCallback proxy_appeared_handler,

GBusProxyVanishedCallback proxy_vanished_handler,
                                                         gpointer user_data,

GDestroyNotify user_data_free_func);

gobject-introspection and its bindings currently assume that the
GDestroyNotify will be called when the callback won't be called
anymore, so stuff such as the FFI closure and any other info that the
bindings had to keep around can be released.

This implies that GDestroyNotify is per callback, but in this case we
have two callbacks and a single GDestroyNotify.

What are bindings supposed to do in this case?

Regards,

Tomeu


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]