diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-24 16:10:09 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-24 16:10:09 +0200 |
commit | 4c3180d4b33b0aa27302721e0d2a75da754880a8 (patch) | |
tree | b519e2a93977c55941c6d47ce6c7a773a9fd3151 /tests/testhelpermodule.c | |
parent | 46dbd9455c37223932e9427da3c0217f5dcdec41 (diff) | |
download | pygobject-4c3180d4b33b0aa27302721e0d2a75da754880a8.tar.gz |
Add tests for pyg_gil_state_ensure/pyg_gil_state_release
Diffstat (limited to 'tests/testhelpermodule.c')
-rw-r--r-- | tests/testhelpermodule.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c index 638727b2..3973a503 100644 --- a/tests/testhelpermodule.c +++ b/tests/testhelpermodule.c @@ -505,6 +505,15 @@ _wrap_test_value(PyObject *self, PyObject *args) } static PyObject * +_wrap_test_state_ensure_release(PyObject *self, PyObject *args) +{ + int state = pyg_gil_state_ensure (); + pyg_gil_state_release (state); + + Py_RETURN_NONE; +} + +static PyObject * _wrap_test_value_array(PyObject *self, PyObject *args) { GValue tvalue = {0,}, *value = &tvalue; @@ -651,6 +660,7 @@ static PyMethodDef testhelper_functions[] = { { "test_to_unichar_conv", (PyCFunction)_wrap_test_to_unichar_conv, METH_VARARGS }, { "get_unknown", (PyCFunction)_wrap_get_unknown, METH_NOARGS }, { "create_test_type", (PyCFunction)_wrap_create_test_type, METH_NOARGS }, + { "test_state_ensure_release", (PyCFunction)_wrap_test_state_ensure_release, METH_NOARGS }, { "test_g_object_new", (PyCFunction)_wrap_test_g_object_new, METH_NOARGS }, { "connectcallbacks", (PyCFunction)_wrap_connectcallbacks, METH_VARARGS }, { "test_value", (PyCFunction)_wrap_test_value, METH_VARARGS }, |