]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-122584: Import mimalloc headers in a C++ context (GH-122587) (#123035)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 16 Aug 2024 08:49:17 +0000 (10:49 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Aug 2024 08:49:17 +0000 (01:49 -0700)
gh-122584: Import mimalloc headers in a C++ context (GH-122587)
(cherry picked from commit 1dad23edbc9db3a13268c1000c8dd428edba29f8)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Include/internal/pycore_mimalloc.h

index d10b01d5b49b1978e3e268e39d036b7ada0c6b41..d870d01beb702c060b7b81ff325a2900bc4d9012 100644 (file)
@@ -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