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

This commit is contained in:
Victor Stinner 2013-12-13 02:32:37 +01:00
commit 2aeb070e4c
1 changed files with 5 additions and 0 deletions

View File

@ -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 */
};