Skip to content

Commit 73fa6be

Browse files
authored
gh-144490: Fix mimalloc debug build for C++ (#144620)
1 parent 9b8d59c commit 73fa6be

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Include/internal/mimalloc/mimalloc/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ struct mi_heap_s {
608608

609609
#if (MI_DEBUG)
610610
// use our own assertion to print without memory allocation
611-
mi_decl_noreturn mi_decl_cold mi_decl_throw
612-
void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func);
611+
mi_decl_noreturn mi_decl_cold
612+
void _mi_assert_fail(const char* assertion, const char* fname, unsigned int line, const char* func) mi_decl_throw;
613613
#define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
614614
#else
615615
#define mi_assert(x)

Lib/test/test_cppext/extension.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
#ifdef TEST_INTERNAL_C_API
1616
// gh-135906: Check for compiler warnings in the internal C API
1717
# include "internal/pycore_frame.h"
18-
// mimalloc emits many compiler warnings when Python is built in debug
19-
// mode (when MI_DEBUG is not zero).
2018
// mimalloc emits compiler warnings when Python is built on Windows.
21-
# if !defined(Py_DEBUG) && !defined(MS_WINDOWS)
19+
# if !defined(MS_WINDOWS)
2220
# include "internal/pycore_backoff.h"
2321
# include "internal/pycore_cell.h"
2422
# endif

0 commit comments

Comments
 (0)