]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134745: Use "pymutex" for sys.thread_info on Windows (#141140)
authorVictor Stinner <vstinner@python.org>
Thu, 6 Nov 2025 15:10:39 +0000 (16:10 +0100)
committerGitHub <noreply@github.com>
Thu, 6 Nov 2025 15:10:39 +0000 (16:10 +0100)
Python/thread.c

index 18c4af7f634c75b1e646c8b6053f93fa9f21174a..0365f977d82b0eda7660453a6473183f65626445 100644 (file)
@@ -334,14 +334,12 @@ PyThread_GetInfo(void)
 
 #ifdef HAVE_PTHREAD_STUBS
     value = Py_NewRef(Py_None);
-#elif defined(_POSIX_THREADS)
+#else
     value = PyUnicode_FromString("pymutex");
     if (value == NULL) {
         Py_DECREF(threadinfo);
         return NULL;
     }
-#else
-    value = Py_NewRef(Py_None);
 #endif
     PyStructSequence_SET_ITEM(threadinfo, pos++, value);