8000 gh-122584: Import mimalloc headers in a C++ context (GH-122587) · miss-islington/cpython@d1dc32e · GitHub
[go: up one dir, main page]

Skip to content

Commit d1dc32e

Browse files
mdboommiss-islington
authored andcommitted
pythongh-122584: Import mimalloc headers in a C++ context (pythonGH-122587)
(cherry picked from commit 1dad23e) Co-authored-by: Michael Droettboom <mdboom@gmail.com>
1 parent 009f9ef commit d1dc32e

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)
0