]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122584: Import mimalloc headers in a C++ context (#122587)
authorMichael Droettboom <mdboom@gmail.com>
Thu, 15 Aug 2024 13:01:01 +0000 (09:01 -0400)
committerGitHub <noreply@github.com>
Thu, 15 Aug 2024 13:01:01 +0000 (09:01 -0400)
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