summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-10-05 22:05:27 (GMT)
committerGitHub <noreply@github.com>2022-10-05 22:05:27 (GMT)
commiteecbeec083ca55ea22e544edba431c9b9023f692 (patch)
tree3242d25b4c4130cda4432cbc8d14dded661e00aa /Python
parent19ec4d40a231f96870f728b4e2339410b86134ea (diff)
downloadcpython-eecbeec083ca55ea22e544edba431c9b9023f692.zip
cpython-eecbeec083ca55ea22e544edba431c9b9023f692.tar.gz
cpython-eecbeec083ca55ea22e544edba431c9b9023f692.tar.bz2
[3.11] gh-96017: Fix some compiler warnings (GH-96018) (#96106)
- only define recreate_gil with ifdef HAVE_FORK. (cherry picked from commit d9c1b746b5013f81d1724757bb3c6a1c87c4a8dc) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval_gil.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
index 23f6fb2..476ed7f 100644
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -133,12 +133,14 @@ static void destroy_gil(struct _gil_runtime_state *gil)
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
}
+#ifdef HAVE_FORK
static void recreate_gil(struct _gil_runtime_state *gil)
{
_Py_ANNOTATE_RWLOCK_DESTROY(&gil->locked);
/* XXX should we destroy the old OS resources here? */
create_gil(gil);
}
+#endif
static void
drop_gil(struct _ceval_runtime_state *ceval, struct _ceval_state *ceval2,