Re: g_bus_watch_proxy and introspection

On May 23, 2010, at 11:41 AM, Tomeu Vizoso wrote:

> 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?

Provided that both callbacks are invalidated when the object is destroyed, then you use a bit of glue code to use them together.  Make a little structure containing the info for both callbacks, and attach that as the user data.  The callback marshaller would look up the right slot, and the destroy notifier would invalidate and destroy both callbacks.

This is not only something that bindings have to deal with -- users of the C api would have to do something similar.

elysse:  You dance better than some.
me:  "Some" what?
elysse:  Some asparagus.

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