diff options
author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2005-01-16 14:47:55 +0000 |
---|---|---|
committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2005-01-16 14:47:55 +0000 |
commit | b76fe9f27e3f8829dc3f8750218507b34154e224 (patch) | |
tree | 66af8a4fd61666fad5ad16b831cd9e7af591aed3 | |
parent | bbda25e94057a8e85da788aef894f92a50b1d5f1 (diff) | |
download | pygobject-b76fe9f27e3f8829dc3f8750218507b34154e224.tar.gz pygobject-b76fe9f27e3f8829dc3f8750218507b34154e224.tar.xz pygobject-b76fe9f27e3f8829dc3f8750218507b34154e224.zip |
interface implementation fixes
-rw-r--r-- | gobject/gobjectmodule.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index ff55b65..3b3f1ac 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1041,14 +1041,18 @@ pyg_type_register(PyObject *self, PyObject *args) GType itype; const GInterfaceInfo *iinfo; - if (PyObject_IsSubclass((PyObject *) base, - (PyObject *) &PyGInterface_Type) != 1) + if (((PyTypeObject *) base)->tp_base != &PyGInterface_Type) continue; + itype = pyg_type_from_object((PyObject *) base); iinfo = pyg_lookup_interface_info(itype); if (!iinfo) { - PyErr_Format(PyExc_NotImplementedError, "Interface type %s " - "has no python implementation support", base->tp_name); + char *msg; + msg = g_strdup_printf("Interface type %s " + "has no python implementation support", + base->tp_name); + PyErr_Warn(PyExc_RuntimeWarning, msg); + g_free(msg); return NULL; } g_type_add_interface_static(instance_type, itype, iinfo); |