summaryrefslogtreecommitdiffstats
path: root/Include/Python.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 9724fb7..d1ffc73 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -61,6 +61,15 @@
#include "pyport.h"
+/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
+ * PYMALLOC_DEBUG is in error if pymalloc is not in use.
+ */
+#if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
+#define PYMALLOC_DEBUG
+#endif
+#if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
+#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
+#endif
#include "pymem.h"
#include "object.h"