aboutsummaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-06-02 21:57:10 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-06-02 21:57:10 +0200
commitd8f0d922d53a8f7bb64c1fda26be386bd2e3d958 (patch)
tree66af4790c65423eb30cf83fbb35c06a3192bc55e /Include
parentaa0e7afa438d7586353a3338fd350449714e117a (diff)
downloadcpython3-d8f0d922d53a8f7bb64c1fda26be386bd2e3d958.tar.gz
Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to
make sure that the code using it will be adapted for the new "calloc" field (instead of crashing).
Diffstat (limited to 'Include')
-rw-r--r--Include/pymem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/pymem.h b/Include/pymem.h
index 7a8dd43fa8..043db64deb 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -128,7 +128,7 @@ typedef enum {
} PyMemAllocatorDomain;
typedef struct {
- /* user context passed as the first argument to the 3 functions */
+ /* user context passed as the first argument to the 4 functions */
void *ctx;
/* allocate a memory block */
@@ -142,11 +142,11 @@ typedef struct {
/* release a memory block */
void (*free) (void *ctx, void *ptr);
-} PyMemAllocator;
+} PyMemAllocatorEx;
/* Get the memory block allocator of the specified domain. */
PyAPI_FUNC(void) PyMem_GetAllocator(PyMemAllocatorDomain domain,
- PyMemAllocator *allocator);
+ PyMemAllocatorEx *allocator);
/* Set the memory block allocator of the specified domain.
@@ -160,7 +160,7 @@ PyAPI_FUNC(void) PyMem_GetAllocator(PyMemAllocatorDomain domain,
PyMem_SetupDebugHooks() function must be called to reinstall the debug hooks
on top on the new allocator. */
PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
- PyMemAllocator *allocator);
+ PyMemAllocatorEx *allocator);
/* Setup hooks to detect bugs in the following Python memory allocator
functions: