summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-12-13 01:30:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-12-13 01:30:12 (GMT)
commit258e4d372f25bd0182ae20d2af899156bdc6a71d (patch)
tree1ebc6555a246c3eac8c354ede18e64da63bf27f7 /Modules
parent131051079351859a5451b873667b489e2a9e9f2a (diff)
downloadcpython-258e4d372f25bd0182ae20d2af899156bdc6a71d.zip
cpython-258e4d372f25bd0182ae20d2af899156bdc6a71d.tar.gz
cpython-258e4d372f25bd0182ae20d2af899156bdc6a71d.tar.bz2
Issue #14432: Fix compilation when thread support is disabled
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 057b9e2..91f291a 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2477,6 +2477,7 @@ test_pytime_object_to_timespec(PyObject *self, PyObject *args)
return Py_BuildValue("Nl", _PyLong_FromTime_t(sec), nsec);
}
+#ifdef WITH_THREAD
typedef struct {
PyThread_type_lock start_event;
PyThread_type_lock exit_event;
@@ -2563,6 +2564,7 @@ exit:
PyThread_free_lock(test_c_thread.exit_event);
return res;
}
+#endif /* WITH_THREAD */
static PyMethodDef TestMethods[] = {
@@ -2661,8 +2663,10 @@ static PyMethodDef TestMethods[] = {
{"pytime_object_to_time_t", test_pytime_object_to_time_t, METH_VARARGS},
{"pytime_object_to_timeval", test_pytime_object_to_timeval, METH_VARARGS},
{"pytime_object_to_timespec", test_pytime_object_to_timespec, METH_VARARGS},
+#ifdef WITH_THREAD
{"call_in_temporary_c_thread", call_in_temporary_c_thread, METH_O,
PyDoc_STR("set_error_class(error_class) -> None")},
+#endif
{NULL, NULL} /* sentinel */
};