Skip to content

Commit 7ee7558

Browse files
[3.13] gh-122584: Import mimalloc headers in a C++ context (GH-122587) (#123035)
gh-122584: Import mimalloc headers in a C++ context (GH-122587) (cherry picked from commit 1dad23e) Co-authored-by: Michael Droettboom <[email protected]>
1 parent cf6d14b commit 7ee7558

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Include/internal/pycore_mimalloc.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,18 @@ typedef enum {
3636
# define MI_TSAN 1
3737
#endif
3838

39+
#ifdef __cplusplus
40+
extern "C++" {
41+
#endif
42+
3943
#include "mimalloc/mimalloc.h"
4044
#include "mimalloc/mimalloc/types.h"
4145
#include "mimalloc/mimalloc/internal.h"
46+
47+
#ifdef __cplusplus
48+
}
49+
#endif
50+
4251
#endif
4352

4453
#ifdef Py_GIL_DISABLED

0 commit comments

Comments
 (0)