Skip to content

Commit

Permalink
Guard assert(tstate->thread_id > 0) with #ifndef HAVE_PTHREAD_STUBS
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed Oct 6, 2023
1 parent 201dc11 commit 9e85366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ static void
unbind_tstate(PyThreadState *tstate)
{
assert(tstate != NULL);
// XXX assert(tstate_is_alive(tstate));
assert(tstate_is_bound(tstate));
// XXX assert(!tstate->_status.active);
#ifndef HAVE_PTHREAD_STUBS
assert(tstate->thread_id > 0);
#endif
#ifdef PY_HAVE_THREAD_NATIVE_ID
assert(tstate->native_thread_id > 0);
#endif
Expand Down

0 comments on commit 9e85366

Please sign in to comment.