Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1dad23e

Browse files
authored
gh-122584: Import mimalloc headers in a C++ context (#122587)
1 parent 3203a74 commit 1dad23e

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)