Skip to content

Commit 6ee68fb

Browse files
[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 b337aef) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 96b784b commit 6ee68fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_testinternalcapi/test_critical_sections.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ test_critical_sections_suspend(PyObject *self, PyObject *Py_UNUSED(args))
130130
Py_RETURN_NONE;
131131
}
132132

133+
#ifdef Py_CAN_START_THREADS
133134
struct test_data {
134135
PyObject *obj1;
135136
PyObject *obj2;
@@ -170,7 +171,6 @@ thread_critical_sections(void *arg)
170171
}
171172
}
172173

173-
#ifdef Py_CAN_START_THREADS
174174
static PyObject *
175175
test_critical_sections_threads(PyObject *self, PyObject *Py_UNUSED(args))
176176
{

0 commit comments

Comments
 (0)