[pygtk] making pygobject_register_sinkfunc a noop?

Johan Dahlin johan at gnome.org
Mon May 25 21:55:27 WST 2009


On Fri, May 22, 2009 at 7:01 AM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
> Hi,
>
> I'm working on pybank and have found a problem when removing the
> floating reference after construction.
>
> The current plan is to base pybank on pygobject, so pybank would
> basically create at runtime the equivalent of the code generated for
> the gtk, gstreamer, etc bindings.
>
> I'm wondering now how can I make the equivalent of calling
> pygobject_register_sinkfunc in pybank and by looking at the gjs code,
> seems like we don't really need for each library bindings to register
> their own sinkfuncs:
>
> http://git.gnome.org/cgit/gjs/tree/gi/object.c#n709
>
> Is Gjs correct and we can do something generically and drop
> pygobject_register_sinkfunc?

Sounds doable. Deprecating pygobject_register_sinkfunc might be the best
long term solution. Meanwhile, is it possible to check if there isnt a
sinkfunk registered
for a type and ues the logic from gjs?


-- 
Johan Dahlin


More information about the pygtk mailing list