Skip to content

Commit dccb9ac

Browse files
committed
Use a table
1 parent 5a1e6fe commit dccb9ac

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

Doc/c-api/memory.rst

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -293,23 +293,39 @@ The following type-oriented macros are provided for convenience. Note that
293293
294294
Same as :c:func:`PyMem_Free`.
295295
296-
.. c:macro:: PyMem_MALLOC(size)
297-
PyMem_NEW(type, size)
298-
PyMem_REALLOC(ptr, size)
299-
PyMem_RESIZE(ptr, type, size)
300-
PyMem_FREE(ptr)
301-
PyMem_DEL(ptr)
302296
303-
These macros are :term:`soft deprecated` aliases for the APIs above,
304-
provided for backwards compatibility.
305-
306-
.. versionchanged:: 3.4
307-
308-
The macros are now aliases of the corresponding mixed-case names.
309-
Previously, their behavior was the same, but their use did
310-
not preserve binary compatibility across Python versions.
311-
312-
.. deprecated:: 2.0
297+
Deprecated aliases
298+
------------------
299+
300+
These are :term:`soft deprecated` aliases to existing functions and macros.
301+
They exist solely for backwards compatibility.
302+
303+
.. list-table::
304+
:widths: auto
305+
:header-rows: 1
306+
307+
* * Deprecated alias
308+
* Corresponding function or macro
309+
* * .. c:macro:: PyMem_MALLOC(size)
310+
* :c:func:`PyMem_Malloc`
311+
* * .. c:macro:: PyMem_NEW(type, size)
312+
* :c:macro:`PyMem_New`
313+
* * .. c:macro:: PyMem_REALLOC(ptr, size)
314+
* :c:func:`PyMem_Realloc`
315+
* * .. c:macro:: PyMem_RESIZE(ptr, type, size)
316+
* :c:macro:`PyMem_Resize`
317+
* * .. c:macro:: PyMem_FREE(ptr)
318+
* :c:func:`PyMem_Free`
319+
* * .. c:macro:: PyMem_DEL(ptr)
320+
* :c:func:`PyMem_Free`
321+
322+
.. versionchanged:: 3.4
323+
324+
The macros are now aliases of the corresponding functions and macros.
325+
Previously, their behavior was the same, but their use did not necessarily
326+
preserve binary compatibility across Python versions.
327+
328+
.. deprecated:: 2.0
313329
314330
315331
.. _objectinterface:

0 commit comments

Comments
 (0)