diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-06-02 19:57:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-06-02 19:57:10 (GMT) |
commit | d8f0d922d53a8f7bb64c1fda26be386bd2e3d958 (patch) | |
tree | 66af4790c65423eb30cf83fbb35c06a3192bc55e /Include | |
parent | aa0e7afa438d7586353a3338fd350449714e117a (diff) | |
download | cpython-d8f0d922d53a8f7bb64c1fda26be386bd2e3d958.zip cpython-d8f0d922d53a8f7bb64c1fda26be386bd2e3d958.tar.gz cpython-d8f0d922d53a8f7bb64c1fda26be386bd2e3d958.tar.bz2 |
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.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/pymem.h b/Include/pymem.h index 7a8dd43..043db64 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: |