summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-12-13 01:32:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-12-13 01:32:37 (GMT)
commit2aeb070e4c8113b2a2f34540235acda1dee90630 (patch)
tree1654bca629af27326fc7b10f72b9370b2f0965bc /Modules/_testcapimodule.c
parentc47fb54ad700c2e3da0309b7e1fec7b28f44d0dd (diff)
parent258e4d372f25bd0182ae20d2af899156bdc6a71d (diff)
downloadcpython-2aeb070e4c8113b2a2f34540235acda1dee90630.zip
cpython-2aeb070e4c8113b2a2f34540235acda1dee90630.tar.gz
cpython-2aeb070e4c8113b2a2f34540235acda1dee90630.tar.bz2
(Merge 3.3) Issue #14432: Fix compilation when thread support is disabled
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index f01c2b8..a0cffde 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2869,6 +2869,7 @@ PyDoc_STRVAR(docstring_with_signature_and_extra_newlines,
"This docstring has a valid signature and some extra newlines."
);
+#ifdef WITH_THREAD
typedef struct {
PyThread_type_lock start_event;
PyThread_type_lock exit_event;
@@ -2955,6 +2956,8 @@ exit:
PyThread_free_lock(test_c_thread.exit_event);
return res;
}
+#endif /* WITH_THREAD */
+
static PyMethodDef TestMethods[] = {
{"raise_exception", raise_exception, METH_VARARGS},
@@ -3084,8 +3087,10 @@ static PyMethodDef TestMethods[] = {
{"docstring_with_signature_and_extra_newlines",
(PyCFunction)test_with_docstring, METH_NOARGS,
docstring_with_signature_and_extra_newlines},
+#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 */
};