mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141004: Document deprecated aliases for memory allocation (GH-141146)
This commit is contained in:
parent
ae1f435071
commit
1d738dea63
1 changed files with 32 additions and 4 deletions
|
|
@ -140,10 +140,6 @@ Allocating Objects on the Heap
|
||||||
* :c:member:`~PyTypeObject.tp_alloc`
|
* :c:member:`~PyTypeObject.tp_alloc`
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: void PyObject_Del(void *op)
|
|
||||||
|
|
||||||
Same as :c:func:`PyObject_Free`.
|
|
||||||
|
|
||||||
.. c:var:: PyObject _Py_NoneStruct
|
.. c:var:: PyObject _Py_NoneStruct
|
||||||
|
|
||||||
Object which is visible in Python as ``None``. This should only be accessed
|
Object which is visible in Python as ``None``. This should only be accessed
|
||||||
|
|
@ -156,3 +152,35 @@ Allocating Objects on the Heap
|
||||||
:ref:`moduleobjects`
|
:ref:`moduleobjects`
|
||||||
To allocate and create extension modules.
|
To allocate and create extension modules.
|
||||||
|
|
||||||
|
|
||||||
|
Deprecated aliases
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
These are :term:`soft deprecated` aliases to existing functions and macros.
|
||||||
|
They exist solely for backwards compatibility.
|
||||||
|
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:widths: auto
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* * Deprecated alias
|
||||||
|
* Function
|
||||||
|
* * .. c:macro:: PyObject_NEW(type, typeobj)
|
||||||
|
* :c:macro:`PyObject_New`
|
||||||
|
* * .. c:macro:: PyObject_NEW_VAR(type, typeobj, n)
|
||||||
|
* :c:macro:`PyObject_NewVar`
|
||||||
|
* * .. c:macro:: PyObject_INIT(op, typeobj)
|
||||||
|
* :c:func:`PyObject_Init`
|
||||||
|
* * .. c:macro:: PyObject_INIT_VAR(op, typeobj, n)
|
||||||
|
* :c:func:`PyObject_InitVar`
|
||||||
|
* * .. c:macro:: PyObject_MALLOC(n)
|
||||||
|
* :c:func:`PyObject_Malloc`
|
||||||
|
* * .. c:macro:: PyObject_REALLOC(p, n)
|
||||||
|
* :c:func:`PyObject_Realloc`
|
||||||
|
* * .. c:macro:: PyObject_FREE(p)
|
||||||
|
* :c:func:`PyObject_Free`
|
||||||
|
* * .. c:macro:: PyObject_DEL(p)
|
||||||
|
* :c:func:`PyObject_Free`
|
||||||
|
* * .. c:macro:: PyObject_Del(p)
|
||||||
|
* :c:func:`PyObject_Free`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue