https://github.com/python/cpython/commit/73fa6be2fe6c4a17d91413e12ab6af8376767211
commit: 73fa6be2fe6c4a17d91413e12ab6af8376767211
branch: main
author: Alper <[email protected]>
committer: vstinner <[email protected]>
date: 2026-02-10T11:56:52+01:00
summary:
gh-144490: Fix mimalloc debug build for C++ (#144620)
files:
M Include/internal/mimalloc/mimalloc/types.h
M Lib/test/test_cppext/extension.cpp
diff --git a/Include/internal/mimalloc/mimalloc/types.h
b/Include/internal/mimalloc/mimalloc/types.h
index 19e93224174314..286e7bf668312d 100644
--- a/Include/internal/mimalloc/mimalloc/types.h
+++ b/Include/internal/mimalloc/mimalloc/types.h
@@ -608,8 +608,8 @@ struct mi_heap_s {
#if (MI_DEBUG)
// use our own assertion to print without memory allocation
-mi_decl_noreturn mi_decl_cold mi_decl_throw
-void _mi_assert_fail(const char* assertion, const char* fname, unsigned int
line, const char* func);
+mi_decl_noreturn mi_decl_cold
+void _mi_assert_fail(const char* assertion, const char* fname, unsigned int
line, const char* func) mi_decl_throw;
#define mi_assert(expr) ((expr) ? (void)0 :
_mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
#else
#define mi_assert(x)
diff --git a/Lib/test/test_cppext/extension.cpp
b/Lib/test/test_cppext/extension.cpp
index a8cd70aacbc805..b631ddad7201f0 100644
--- a/Lib/test/test_cppext/extension.cpp
+++ b/Lib/test/test_cppext/extension.cpp
@@ -15,10 +15,8 @@
#ifdef TEST_INTERNAL_C_API
// 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.
-# if !defined(Py_DEBUG) && !defined(MS_WINDOWS)
+# if !defined(MS_WINDOWS)
# include "internal/pycore_backoff.h"
# include "internal/pycore_cell.h"
# endif
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]