@@ -140,10 +140,6 @@ Allocating Objects on the Heap |
140 | 140 | * :c:member:`~PyTypeObject.tp_alloc` |
141 | 141 |
|
142 | 142 |
|
143 | | -.. c:function:: void PyObject_Del(void *op) |
144 | | -
|
145 | | - Same as :c:func:`PyObject_Free`. |
146 | | -
|
147 | 143 | .. c:var:: PyObject _Py_NoneStruct |
148 | 144 |
|
149 | 145 | Object which is visible in Python as ``None``. This should only be accessed |
@@ -156,3 +152,35 @@ Allocating Objects on the Heap |
156 | 152 | :ref:`moduleobjects` |
157 | 153 | To allocate and create extension modules. |
158 | 154 |
|
| 155 | + |
| 156 | +Deprecated aliases |
| 157 | +^^^^^^^^^^^^^^^^^^ |
| 158 | + |
| 159 | +These are :term:`soft deprecated` aliases to existing functions and macros. |
| 160 | +They exist solely for backwards compatibility. |
| 161 | + |
| 162 | + |
| 163 | +.. list-table:: |
| 164 | + :widths: auto |
| 165 | + :header-rows: 1 |
| 166 | + |
| 167 | + * * Deprecated alias |
| 168 | + * Function |
| 169 | + * * .. c:macro:: PyObject_NEW(type, typeobj) |
| 170 | + * :c:macro:`PyObject_New` |
| 171 | + * * .. c:macro:: PyObject_NEW_VAR(type, typeobj, n) |
| 172 | + * :c:macro:`PyObject_NewVar` |
| 173 | + * * .. c:macro:: PyObject_INIT(op, typeobj) |
| 174 | + * :c:func:`PyObject_Init` |
| 175 | + * * .. c:macro:: PyObject_INIT_VAR(op, typeobj, n) |
| 176 | + * :c:func:`PyObject_InitVar` |
| 177 | + * * .. c:macro:: PyObject_MALLOC(n) |
| 178 | + * :c:func:`PyObject_Malloc` |
| 179 | + * * .. c:macro:: PyObject_REALLOC(p, n) |
| 180 | + * :c:func:`PyObject_Realloc` |
| 181 | + * * .. c:macro:: PyObject_FREE(p) |
| 182 | + * :c:func:`PyObject_Free` |
| 183 | + * * .. c:macro:: PyObject_DEL(p) |
| 184 | + * :c:func:`PyObject_Free` |
| 185 | + * * .. c:macro:: PyObject_Del(p) |
| 186 | + * :c:func:`PyObject_Free` |