Re: When to use GLib/glib or GObject/gobject
- From: John Stowers <john stowers lists gmail com>
- To: Laszlo Pandy <laszlok2 gmail com>
- Cc: python-hackers-list gnome org
- Subject: Re: When to use GLib/glib or GObject/gobject
- Date: Tue, 15 Mar 2011 18:11:33 +1300
On Sun, 2011-03-06 at 18:03 +0100, Laszlo Pandy wrote:
> On Sun, Mar 6, 2011 at 12:26 PM, John Stowers
> <john stowers lists gmail com> wrote:
> > Hi,
> > I've recently been porting some of my software to PyGObject + g-i and
> > was wondering;
> > 1) Is it recommended to use the g-i bindings for the GObject namespace?
> > (i.e. based on the demos GObject.timeout_add seem to work fine but the
> > pygi-convert script still uses import gobject)
> > 2) Is it recommended to use the g-i bindings for the glib namespace?
> > My (threaded) application  needed glib.threads_init() to be called,
> > inorder to work as before, and AFAIK there is no equivalent to this
> > special function in g-i.
> I believe that the idea is to use GObject and GLib, because we still
> want gobject and glib to installable and useable for applications
> expecting to use the static bindings.
This isn't really what I was asking. Things break in subtle ways (in my
multithreaded programs when I use gobject instead of GObject).
Is there an official position on this? Can I just assume (and tell
others) that this breakage means "use GObject"
You are correct, the GLib bindings seem to be missing many annotations
to make them useful, so using glib here is a matter of necessity.
] [Thread Prev