summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-08-01 12:12:33 (GMT)
committerGitHub <noreply@github.com>2024-08-01 12:12:33 (GMT)
commitfda6bd842a2b93a501526f1b830eb900d935ac73 (patch)
treed2c76a2c54a99b18fd297662a1b4809f8977a8a4 /Objects
parent88030861e216ac791725c8784752201d6fe31329 (diff)
downloadcpython-fda6bd842a2b93a501526f1b830eb900d935ac73.zip
cpython-fda6bd842a2b93a501526f1b830eb900d935ac73.tar.gz
cpython-fda6bd842a2b93a501526f1b830eb900d935ac73.tar.bz2
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.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c2
-rw-r--r--Objects/bytesobject.c2
-rw-r--r--Objects/codeobject.c4
-rw-r--r--Objects/complexobject.c2
-rw-r--r--Objects/fileobject.c2
-rw-r--r--Objects/odictobject.c2
-rw-r--r--Objects/rangeobject.c2
-rw-r--r--Objects/typeobject.c4
-rw-r--r--Objects/unicodeobject.c2
9 files changed, 11 insertions, 11 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 80679f9..a80e467 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2426,7 +2426,7 @@ PyTypeObject PyByteArray_Type = {
(initproc)bytearray___init__, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
PyType_GenericNew, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
/*********************** Bytearray Iterator ****************************/
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 459df6c..e88b199 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -3066,7 +3066,7 @@ PyTypeObject PyBytes_Type = {
0, /* tp_init */
bytes_alloc, /* tp_alloc */
bytes_new, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
void
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index d45ba5e..6423a42 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -1352,7 +1352,7 @@ PyTypeObject _PyLineIterator = {
0, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
static lineiterator *
@@ -1443,7 +1443,7 @@ PyTypeObject _PyPositionsIterator = {
0, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
static PyObject*
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 7c8a6bd..4a8dac6 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -1247,5 +1247,5 @@ PyTypeObject PyComplex_Type = {
0, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
actual_complex_new, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index bae49d3..c377d1b 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -462,7 +462,7 @@ PyTypeObject PyStdPrinter_Type = {
0, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
0, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index 30277aa..a9b801e 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -276,7 +276,7 @@ tp_dictoffset (__dict__) - -
tp_init __init__ object_init dict_init
tp_alloc - PyType_GenericAlloc (repeated)
tp_new __new__ object_new dict_new
-tp_free - PyObject_Del PyObject_GC_Del
+tp_free - PyObject_Free PyObject_GC_Del
================= ================ =================== ================
Relevant Methods
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 9727b4f..1318ce0 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -899,7 +899,7 @@ PyTypeObject PyRangeIter_Type = {
sizeof(_PyRangeIterObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)PyObject_Del, /* tp_dealloc */
+ (destructor)PyObject_Free, /* tp_dealloc */
0, /* tp_vectorcall_offset */
0, /* tp_getattr */
0, /* tp_setattr */
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 5b0a466..a2d82e6 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -7456,7 +7456,7 @@ PyTypeObject PyBaseObject_Type = {
object_init, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
object_new, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
};
@@ -8180,7 +8180,7 @@ type_ready_inherit(PyTypeObject *type)
/* Sanity check for tp_free. */
if (_PyType_IS_GC(type) && (type->tp_flags & Py_TPFLAGS_BASETYPE) &&
- (type->tp_free == NULL || type->tp_free == PyObject_Del))
+ (type->tp_free == NULL || type->tp_free == PyObject_Free))
{
/* This base class needs to call tp_free, but doesn't have
* one, or its tp_free is for non-gc'ed objects.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index ffb879a..1257881 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -15265,7 +15265,7 @@ PyTypeObject PyUnicode_Type = {
0, /* tp_init */
0, /* tp_alloc */
unicode_new, /* tp_new */
- PyObject_Del, /* tp_free */
+ PyObject_Free, /* tp_free */
.tp_vectorcall = unicode_vectorcall,
};