summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-06 23:48:48 (GMT)
committerGitHub <noreply@github.com>2023-10-06 23:48:48 (GMT)
commit2465fe00140fd902e7b5b61e12db4a6f7107e2fa (patch)
tree655e5b1686904c815e01ccfcbbe7d4c57af22f73 /Python/pystate.c
parentb77f5eea70b2f46d7b94c645645db3475e9d4c0e (diff)
downloadcpython-2465fe00140fd902e7b5b61e12db4a6f7107e2fa.zip
cpython-2465fe00140fd902e7b5b61e12db4a6f7107e2fa.tar.gz
cpython-2465fe00140fd902e7b5b61e12db4a6f7107e2fa.tar.bz2
[3.12] GH-110455: Guard `assert(tstate->thread_id > 0)` with `GH-ifndef HAVE_PTHREAD_STUBS` (GH-110487) (GH-110491)
GH-110455: Guard `assert(tstate->thread_id > 0)` with `GH-ifndef HAVE_PTHREAD_STUBS` (GH-110487) (cherry picked from commit 5fd8821cf8eb1fe2e8575f8c7cc747cf78855a88) Co-authored-by: Brett Cannon <brett@python.org>
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 b77827f..6f60c3d 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -264,10 +264,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