From: Alper Date: Tue, 10 Feb 2026 10:56:52 +0000 (-0800) Subject: gh-144490: Fix mimalloc debug build for C++ (#144620) X-Git-Tag: v3.15.0a6~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73fa6be2fe6c4a17d91413e12ab6af8376767211;p=thirdparty%2FPython%2Fcpython.git gh-144490: Fix mimalloc debug build for C++ (#144620) --- diff --git a/Include/internal/mimalloc/mimalloc/types.h b/Include/internal/mimalloc/mimalloc/types.h index 19e932241743..286e7bf66831 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 a8cd70aacbc8..b631ddad7201 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