mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
(Merge 3.3) Issue #14432: Fix compilation when thread support is disabled
This commit is contained in:
commit
2aeb070e4c
1 changed files with 5 additions and 0 deletions
|
|
@ -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 @@ call_in_temporary_c_thread(PyObject *self, PyObject *callback)
|
|||
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 */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue