Skip to content

Commit eecbeec

Browse files
authored
[3.11] gh-96017: Fix some compiler warnings (GH-96018) (#96106)
- only define recreate_gil with ifdef HAVE_FORK. (cherry picked from commit d9c1b74) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 19ec4d4 commit eecbeec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/ceval_gil.h

+2
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ static void destroy_gil(struct _gil_runtime_state *gil)
133133
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
134134
}
135135

136+
#ifdef HAVE_FORK
136137
static void recreate_gil(struct _gil_runtime_state *gil)
137138
{
138139
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
139140
/* XXX should we destroy the old OS resources here? */
140141
create_gil(gil);
141142
}
143+
#endif
142144

143145
static void
144146
drop_gil(struct _ceval_runtime_state *ceval, struct _ceval_state *ceval2,

0 commit comments

Comments
 (0)