summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-02-27 04:45:05 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-02-27 04:45:05 (GMT)
commita35c688055c72e9442f6a82c3ec0e09654077975 (patch)
tree081386e63e64467a01558567750b371baa527f8e /Include
parent29906eef3a56c43a4cd68a8706c75844b2384e59 (diff)
downloadcpython-a35c688055c72e9442f6a82c3ec0e09654077975.zip
cpython-a35c688055c72e9442f6a82c3ec0e09654077975.tar.gz
cpython-a35c688055c72e9442f6a82c3ec0e09654077975.tar.bz2
Add Vladimir Marangozov's object allocator. It is disabled by default. This
closes SF patch #401229.
Diffstat (limited to 'Include')
-rw-r--r--Include/objimpl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 9c13e71..4197bde 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -76,6 +76,13 @@ recommended to use PyObject_{New, NewVar, Del}. */
memory management purposes exclusively. Both the core and extension
modules should use the PyObject_* API. */
+#ifdef WITH_PYMALLOC
+#define PyCore_OBJECT_MALLOC_FUNC _PyCore_ObjectMalloc
+#define PyCore_OBJECT_REALLOC_FUNC _PyCore_ObjectRealloc
+#define PyCore_OBJECT_FREE_FUNC _PyCore_ObjectFree
+#define NEED_TO_DECLARE_OBJECT_MALLOC_AND_FRIEND
+#endif /* !WITH_PYMALLOC */
+
#ifndef PyCore_OBJECT_MALLOC_FUNC
#undef PyCore_OBJECT_REALLOC_FUNC
#undef PyCore_OBJECT_FREE_FUNC