Skip to content

Commit

Permalink
fix registration of already registered types through the gobject meta…
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
Gustavo J. A. M. Carneiro committed May 29, 2005
1 parent d71bf81 commit c91990e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gobject/pygobject.c
Expand Up @@ -1249,9 +1249,16 @@ PyTypeObject PyGObject_Type = {
static int
pygobjectmeta_init(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
{
PyObject *instance_dict;
if (PyType_Type.tp_init((PyObject *) subtype, args, kwargs))
return -1;
return pyg_type_register(subtype);
instance_dict = PyTuple_GetItem(args, 2);
if (instance_dict) {
if (PyDict_GetItemString(instance_dict, "__gtype__") == NULL)
return pyg_type_register(subtype);
} else
PyErr_Clear();
return 0;
}


Expand Down

0 comments on commit c91990e

Please sign in to comment.