Is there a non-hackish way to find if GObject is initialized or not?
It seems non-initialized objects have zero hash, while initialized
have non-zero, but it is probably a hack to depend on it...
Using the hash is fine.
It's currently implemented like this:
static long
pygobject_hash(PyGObject *self)
{
return (long)self->obj;
}
self->obj is NULL if the object isn't initialized and will return 0.
If it's initialized, self->obj will return the memory address of the
GObject pointer.
This code is unlikely to go away and you can safely depend on it.
Johan
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/