aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2023-10-06 16:12:19 -0700
committerGitHub <noreply@github.com>2023-10-06 16:12:19 -0700
commit5fd8821cf8eb1fe2e8575f8c7cc747cf78855a88 (patch)
treeaac591f85a540fcbff2ce55d6002af6ae791d137 /Python
parentf013b475047b2e9d377feda9f2e16e5cdef824d7 (diff)
downloadcpython-5fd8821cf8eb1fe2e8575f8c7cc747cf78855a88.tar.gz
cpython-5fd8821cf8eb1fe2e8575f8c7cc747cf78855a88.zip
GH-110455: Guard `assert(tstate->thread_id > 0)` with `#ifndef HAVE_PTHREAD_STUBS` (GH-110487)
Diffstat (limited to 'Python')
-rw-r--r--Python/pystate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index a024ae7e380..849a4eec86a 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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