summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-08-10 07:55:46 (GMT)
committerGitHub <noreply@github.com>2021-08-10 07:55:46 (GMT)
commitb019ffed5debb13358a946a8e2d20594c7c181f3 (patch)
tree635eae605f39ed285a3f6fbbd708104395769c4e
parent0a423096e8d8bbe22c0fb0904f7520387a8d4247 (diff)
downloadcpython-b019ffed5debb13358a946a8e2d20594c7c181f3.zip
cpython-b019ffed5debb13358a946a8e2d20594c7c181f3.tar.gz
cpython-b019ffed5debb13358a946a8e2d20594c7c181f3.tar.bz2
bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27692)
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2021-08-09-16-16-03.bpo-44872.OKRlhK.rst1
-rw-r--r--Objects/frameobject.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-08-09-16-16-03.bpo-44872.OKRlhK.rst b/Misc/NEWS.d/next/Core and Builtins/2021-08-09-16-16-03.bpo-44872.OKRlhK.rst
new file mode 100644
index 0000000..9a0d000
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2021-08-09-16-16-03.bpo-44872.OKRlhK.rst
@@ -0,0 +1 @@
+Use new trashcan macros (Py_TRASHCAN_BEGIN/END) in frameobject.c instead of the old ones (Py_TRASHCAN_SAFE_BEGIN/END). \ No newline at end of file
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 3abd8e5..5ca5e06 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -423,7 +423,7 @@ frame_dealloc(PyFrameObject *f)
if (_PyObject_GC_IS_TRACKED(f))
_PyObject_GC_UNTRACK(f);
- Py_TRASHCAN_SAFE_BEGIN(f)
+ Py_TRASHCAN_BEGIN(f, frame_dealloc);
/* Kill all local variables */
valuestack = f->f_valuestack;
for (p = f->f_localsplus; p < valuestack; p++)
@@ -453,7 +453,7 @@ frame_dealloc(PyFrameObject *f)
PyObject_GC_Del(f);
Py_DECREF(co);
- Py_TRASHCAN_SAFE_END(f)
+ Py_TRASHCAN_END;
}
static int