summaryrefslogtreecommitdiffstats
path: root/gobject
diff options
context:
space:
mode:
Diffstat (limited to 'gobject')
-rw-r--r--gobject/pygenum.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gobject/pygenum.c b/gobject/pygenum.c
index 543bc49..876e464 100644
--- a/gobject/pygenum.c
+++ b/gobject/pygenum.c
@@ -30,14 +30,17 @@
static PyObject *
pyg_enum_richcompare(PyGEnum *self, PyObject *other, int op)
{
+ static char warning[256];
+
if (!PyInt_Check(other)) {
Py_INCREF(Py_NotImplemented);
return Py_NotImplemented;
}
if (PyObject_TypeCheck(other, &PyGEnum_Type) && ((PyGEnum*)other)->gtype != self->gtype) {
- PyErr_Warn(PyExc_Warning, "comparing different enum types");
- return NULL;
+ g_snprintf(warning, sizeof(warning), "comparing different enum types: %s and %s",
+ g_type_name(self->gtype), g_type_name(((PyGEnum*)other)->gtype));
+ PyErr_Warn(PyExc_Warning, warning);
}
return pyg_integer_richcompare((PyObject *)self, other, op);