[pygtk] is GObject initialized?
jdahlin at async.com.br
Sun Dec 3 09:28:30 WST 2006
> 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:
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
This code is unlikely to go away and you can safely depend on it.
More information about the pygtk