[3.13] gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (GH-120585) (#120592)

gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (GH-120585)
(cherry picked from commit b337aefd3e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2024-06-16 19:38:00 +02:00 committed by GitHub
parent 96b784b61f
commit 6ee68fbf9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -130,6 +130,7 @@ test_critical_sections_suspend(PyObject *self, PyObject *Py_UNUSED(args))
Py_RETURN_NONE; Py_RETURN_NONE;
} }
#ifdef Py_CAN_START_THREADS
struct test_data { struct test_data {
PyObject *obj1; PyObject *obj1;
PyObject *obj2; PyObject *obj2;
@ -170,7 +171,6 @@ thread_critical_sections(void *arg)
} }
} }
#ifdef Py_CAN_START_THREADS
static PyObject * static PyObject *
test_critical_sections_threads(PyObject *self, PyObject *Py_UNUSED(args)) test_critical_sections_threads(PyObject *self, PyObject *Py_UNUSED(args))
{ {