Commit 2aeb070e authored by Victor Stinner's avatar Victor Stinner

(Merge 3.3) Issue #14432: Fix compilation when thread support is disabled

parents c47fb54a 258e4d37
......@@ -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 */
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment