diff options
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2009-09-28 13:12:38 +0000 |
|---|---|---|
| committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2009-09-28 13:12:38 +0000 |
| commit | 02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da (patch) | |
| tree | e8324025b807032f476c398675dc7a162c2440de /Include/pymem.h | |
| parent | d12f86ce96d3aeb91e9c7f010e303bbc1b8d14da (diff) | |
| download | cpython-git-02ca57ce4c728c4a18d31a6a3f2681bcd1aea2da.tar.gz | |
http://bugs.python.org/issue6836
The debug memory api now keeps track of which external API (PyMem_* or PyObject_*) was used to allocate each block and treats any API violation as an error. Added separate _PyMem_DebugMalloc functions for the Py_Mem API instead of having it use the _PyObject_DebugMalloc functions.
Diffstat (limited to 'Include/pymem.h')
| -rw-r--r-- | Include/pymem.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/pymem.h b/Include/pymem.h index 542aceef25..e2dfe0d3fc 100644 --- a/Include/pymem.h +++ b/Include/pymem.h @@ -59,9 +59,9 @@ PyAPI_FUNC(void) PyMem_Free(void *); /* Macros. */ #ifdef PYMALLOC_DEBUG /* Redirect all memory operations to Python's debugging allocator. */ -#define PyMem_MALLOC PyObject_MALLOC -#define PyMem_REALLOC PyObject_REALLOC -#define PyMem_FREE PyObject_FREE +#define PyMem_MALLOC _PyMem_DebugMalloc +#define PyMem_REALLOC _PyMem_DebugRealloc +#define PyMem_FREE _PyMem_DebugFree #else /* ! PYMALLOC_DEBUG */ |
