Don't declare _PyMem_MimallocEnabled() if WITH_PYMALLOC macro is not
defined (./configure --without-pymalloc).
Fix also a typo in _PyInterpreterState_FinalizeAllocatedBlocks().
}
-#if defined(WITH_PYMALLOC) || defined(WITH_MIMALLOC)
+#ifdef WITH_PYMALLOC
static int
_PyMem_DebugEnabled(void)
{
return (_PyObject.malloc == _PyMem_DebugMalloc);
}
-#ifdef WITH_PYMALLOC
static int
_PyMem_PymallocEnabled(void)
{
return (_PyObject.malloc == _PyObject_Malloc);
}
}
-#endif
+
#ifdef WITH_MIMALLOC
static int
_PyMem_MimallocEnabled(void)
return (_PyObject.malloc == _PyObject_MiMalloc);
}
}
-#endif
-#endif // defined(WITH_PYMALLOC) || defined(WITH_MIMALLOC)
+#endif // WITH_MIMALLOC
+
+#endif // WITH_PYMALLOC
static void
void
_PyInterpreterState_FinalizeAllocatedBlocks(PyInterpreterState *interp)
{
-#ifdef WITH_MIAMLLOC
+#ifdef WITH_MIMALLOC
if (_PyMem_MimallocEnabled()) {
return;
}