summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_mimalloc.h
diff options
context:
space:
mode:
authorMichael Droettboom <mdboom@gmail.com>2024-08-15 13:01:01 (GMT)
committerGitHub <noreply@github.com>2024-08-15 13:01:01 (GMT)
commit1dad23edbc9db3a13268c1000c8dd428edba29f8 (patch)
treea06fc047309f8f8ec7c68d8d241c94351def128b /Include/internal/pycore_mimalloc.h
parent3203a7412977b8da3aba2770308136a37f48c927 (diff)
downloadcpython-1dad23edbc9db3a13268c1000c8dd428edba29f8.zip
cpython-1dad23edbc9db3a13268c1000c8dd428edba29f8.tar.gz
cpython-1dad23edbc9db3a13268c1000c8dd428edba29f8.tar.bz2
gh-122584: Import mimalloc headers in a C++ context (#122587)
Diffstat (limited to 'Include/internal/pycore_mimalloc.h')
-rw-r--r--Include/internal/pycore_mimalloc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/internal/pycore_mimalloc.h b/Include/internal/pycore_mimalloc.h
index d10b01d..d870d01 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