Skip to content

Commit 638e58d

Browse files
committed
Fix build without mimalloc
1 parent d15c5f6 commit 638e58d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Python/sysmodule.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Data members:
2020
#include "pycore_code.h" // _Py_QuickenedCount
2121
#include "pycore_frame.h" // _PyInterpreterFrame
2222
#include "pycore_initconfig.h" // _PyStatus_EXCEPTION()
23-
#include "pycore_mimalloc.h" // MI_SECURE, MI_DEBUG
23+
#ifdef WITH_MIMALLOC
24+
# include "pycore_mimalloc.h" // MI_SECURE, MI_DEBUG
25+
#endif
2426
#include "pycore_namespace.h" // _PyNamespace_New()
2527
#include "pycore_object.h" // _PyObject_IS_GC()
2628
#include "pycore_pathconfig.h" // _PyPathConfig_ComputeSysPath0()
@@ -1970,8 +1972,13 @@ make_malloc_info(void)
19701972
#endif
19711973
PyStructSequence_SET_ITEM(malloc_info, pos++, _Py_NewRef(v));
19721974

1975+
#ifdef WITH_MIMALLOC
19731976
SetIntItem(MI_SECURE);
19741977
SetIntItem(MI_DEBUG);
1978+
#else
1979+
SetIntItem(-1);
1980+
SetIntItem(-1);
1981+
#endif
19751982

19761983
#undef SetIntItem
19771984

0 commit comments

Comments
 (0)