summaryrefslogtreecommitdiff
path: root/gi/pygi-source.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:23 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:27 +0900
commit392945d666d2cfb31a844826a72b1eb65a52546f (patch)
treea21354051734cbace4e92d6b10c8fa8cd2721dda /gi/pygi-source.c
parent4723e0bb24cc41607e5af3bb7036855fa767df0b (diff)
downloadpygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.gz
pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.bz2
pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.zip
Imported Upstream version 3.25.1
Change-Id: I31412b37aa390505e71295f3a2c2e3cf2ba88b41 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/pygi-source.c')
-rw-r--r--gi/pygi-source.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gi/pygi-source.c b/gi/pygi-source.c
index 154b1cd..5305260 100644
--- a/gi/pygi-source.c
+++ b/gi/pygi-source.c
@@ -45,7 +45,7 @@ pyg_source_prepare(GSource *source, gint *timeout)
gboolean got_err = TRUE;
PyGILState_STATE state;
- state = pyglib_gil_state_ensure();
+ state = PyGILState_Ensure();
t = PyObject_CallMethod(pysource->obj, "prepare", NULL);
@@ -81,7 +81,7 @@ bail:
Py_XDECREF(t);
- pyglib_gil_state_release(state);
+ PyGILState_Release(state);
return ret;
}
@@ -94,7 +94,7 @@ pyg_source_check(GSource *source)
gboolean ret;
PyGILState_STATE state;
- state = pyglib_gil_state_ensure();
+ state = PyGILState_Ensure();
t = PyObject_CallMethod(pysource->obj, "check", NULL);
@@ -106,7 +106,7 @@ pyg_source_check(GSource *source)
Py_DECREF(t);
}
- pyglib_gil_state_release(state);
+ PyGILState_Release(state);
return ret;
}
@@ -119,7 +119,7 @@ pyg_source_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
gboolean ret;
PyGILState_STATE state;
- state = pyglib_gil_state_ensure();
+ state = PyGILState_Ensure();
if (callback) {
tuple = user_data;
@@ -141,7 +141,7 @@ pyg_source_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
Py_DECREF(t);
}
- pyglib_gil_state_release(state);
+ PyGILState_Release(state);
return ret;
}
@@ -153,7 +153,7 @@ pyg_source_finalize(GSource *source)
PyObject *func, *t;
PyGILState_STATE state;
- state = pyglib_gil_state_ensure();
+ state = PyGILState_Ensure();
func = PyObject_GetAttrString(pysource->obj, "finalize");
if (func) {
@@ -165,9 +165,11 @@ pyg_source_finalize(GSource *source)
} else {
Py_DECREF(t);
}
+ } else {
+ PyErr_Clear ();
}
- pyglib_gil_state_release(state);
+ PyGILState_Release(state);
}
static GSourceFuncs pyg_source_funcs =