From d1dc32eb602bf411370be912a1ac8b03f2a46046 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 15 Aug 2024 09:01:01 -0400 Subject: [PATCH] gh-122584: Import mimalloc headers in a C++ context (GH-122587) (cherry picked from commit 1dad23edbc9db3a13268c1000c8dd428edba29f8) Co-authored-by: Michael Droettboom --- Include/internal/pycore_mimalloc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Include/internal/pycore_mimalloc.h b/Include/internal/pycore_mimalloc.h index d10b01d5b49b19..d870d01beb702c 100644 --- a/Include/internal/pycore_mimalloc.h +++ b/Include/internal/pycore_mimalloc.h @@ -36,9 +36,18 @@ typedef enum { # define MI_TSAN 1 #endif +#ifdef __cplusplus +extern "C++" { +#endif + #include "mimalloc/mimalloc.h" #include "mimalloc/mimalloc/types.h" #include "mimalloc/mimalloc/internal.h" + +#ifdef __cplusplus +} +#endif + #endif #ifdef Py_GIL_DISABLED