Skip to content

Commit b337aef

Browse files
authored
gh-120584: Fix "unused thread_critical_sections" warning in test_critical_sections (#120585)
1 parent b8484c6 commit b337aef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_testinternalcapi/test_critical_sections.c

+1-1
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)