Replace PyObject_Del with PyObject_Free (#122453)

PyObject_Del() is just a alias to PyObject_Free() kept for backward
compatibility. Use directly PyObject_Free() instead.
This commit is contained in:
Victor Stinner 2024-08-01 14:12:33 +02:00 committed by GitHub
parent 88030861e2
commit fda6bd842a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 18 additions and 18 deletions

View file

@ -650,7 +650,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
(doesn't have the :c:macro:`Py_TPFLAGS_BASETYPE` flag bit set), it is
permissible to call the object deallocator directly instead of via
:c:member:`~PyTypeObject.tp_free`. The object deallocator should be the one used to allocate the
instance; this is normally :c:func:`PyObject_Del` if the instance was allocated
instance; this is normally :c:func:`PyObject_Free` if the instance was allocated
using :c:macro:`PyObject_New` or :c:macro:`PyObject_NewVar`, or
:c:func:`PyObject_GC_Del` if the instance was allocated using
:c:macro:`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar`.
@ -1954,7 +1954,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
match :c:func:`PyType_GenericAlloc` and the value of the
:c:macro:`Py_TPFLAGS_HAVE_GC` flag bit.
For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Del`.
For static subtypes, :c:data:`PyBaseObject_Type` uses :c:func:`PyObject_Free`.
.. c:member:: inquiry PyTypeObject.tp_is_gc