Skip to content

Commit

Permalink
[3.11] pythongh-96017: Fix some compiler warnings (pythonGH-96018)
Browse files Browse the repository at this point in the history
- "comparison of integers of different signs" in typeobject.c
- only define static_builtin_index_is_set in DEBUG builds
- only define recreate_gil with ifdef HAVE_FORK.
(cherry picked from commit d9c1b74)

Co-authored-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran committed Aug 19, 2022
1 parent d699068 commit 70dd200
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/ceval_gil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 70dd200

Please sign in to comment.