]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144490: Fix test_cppext on Windows (#144628)
authorVictor Stinner <vstinner@python.org>
Mon, 9 Feb 2026 16:17:00 +0000 (17:17 +0100)
committerGitHub <noreply@github.com>
Mon, 9 Feb 2026 16:17:00 +0000 (17:17 +0100)
Don't include pycore_backoff.h and pycore_cell.h on Windows, since
they emit C++ compiler warnings.

Lib/test/test_cppext/extension.cpp

index 038f67bbbe3f74d2cc4a14d5ad3add37cd929238..a8cd70aacbc805a6ba7ddcd38530c154316cbd15 100644 (file)
    // gh-135906: Check for compiler warnings in the internal C API
 #  include "internal/pycore_frame.h"
    // mimalloc emits many compiler warnings when Python is built in debug
-   // mode (when MI_DEBUG is not zero)
-   // mimalloc emits compiler warnings when Python is built on Windows
-   // in free-threaded mode.
-#  if !defined(Py_DEBUG) && !(defined(MS_WINDOWS) && defined(Py_GIL_DISABLED))
+   // mode (when MI_DEBUG is not zero).
+   // mimalloc emits compiler warnings when Python is built on Windows.
+#  if !defined(Py_DEBUG) && !defined(MS_WINDOWS)
 #    include "internal/pycore_backoff.h"
 #    include "internal/pycore_cell.h"
 #  endif