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).
This commit is contained in:
Victor Stinner 2014-06-02 21:57:10 +02:00
parent aa0e7afa43
commit d8f0d922d5
6 changed files with 32 additions and 29 deletions

View file

@ -232,7 +232,7 @@ Customize Memory Allocators
.. versionadded:: 3.4
.. c:type:: PyMemAllocator
.. c:type:: PyMemAllocatorEx
Structure used to describe a memory block allocator. The structure has
four fields:
@ -253,7 +253,9 @@ Customize Memory Allocators
+----------------------------------------------------------+---------------------------------------+
.. versionchanged:: 3.5
Add a new field ``calloc``.
The :c:type:`PyMemAllocator` structure was renamed to
:c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added.
.. c:type:: PyMemAllocatorDomain
@ -267,12 +269,12 @@ Customize Memory Allocators
:c:func:`PyObject_Realloc` and :c:func:`PyObject_Free`
.. c:function:: void PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
.. c:function:: void PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
Get the memory block allocator of the specified domain.
.. c:function:: void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
.. c:function:: void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
Set the memory block allocator of the specified domain.