From 72a6b606f7c6c1ed26a8c28c9e4d6dad1ce056bb Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Fri, 2 Sep 2005 15:03:53 +0000 Subject: Also include interfaces, fixes #315038 * gobject/gobjectmodule.c: (pyg_signal_list_names): Also include interfaces, fixes #315038 --- gobject/gobjectmodule.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 078201c..c43d368 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1320,7 +1320,8 @@ pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs) guint n; guint *ids; guint i; - + gpointer iface = NULL; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gobject.signal_list_names", kwlist, &py_itype)) @@ -1339,6 +1340,8 @@ pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs) PyErr_SetString(PyExc_TypeError, "type must be instantiable or an interface"); return NULL; + } else { + iface = g_type_default_interface_ref(itype); } ids = g_signal_list_ids(itype, &n); @@ -1352,7 +1355,10 @@ pyg_signal_list_names (PyObject *self, PyObject *args, PyObject *kwargs) g_free(ids); if (class) - g_type_class_unref(class); + g_type_class_unref(class); + else + g_type_default_interface_unref(iface); + return list; } -- cgit