summaryrefslogtreecommitdiff
path: root/gi/_glib/glibmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/_glib/glibmodule.c')
-rw-r--r--gi/_glib/glibmodule.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gi/_glib/glibmodule.c b/gi/_glib/glibmodule.c
index 11b97f5..7d70a07 100644
--- a/gi/_glib/glibmodule.c
+++ b/gi/_glib/glibmodule.c
@@ -313,7 +313,7 @@ pyglib_source_remove(PyObject *self, PyObject *args)
{
guint tag;
- if (!PyArg_ParseTuple(args, "i:source_remove", &tag))
+ if (!PyArg_ParseTuple(args, "I:source_remove", &tag))
return NULL;
return PyBool_FromLong(g_source_remove(tag));
@@ -351,9 +351,15 @@ static void
child_watch_dnotify(gpointer data)
{
struct _PyGChildData *child_data = (struct _PyGChildData *) data;
+ PyGILState_STATE gil;
+
+ gil = pyglib_gil_state_ensure();
+
Py_DECREF(child_data->func);
Py_XDECREF(child_data->data);
g_slice_free(struct _PyGChildData, child_data);
+
+ pyglib_gil_state_release(gil);
}