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