[Python-checkins] bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27691)

ambv webhook-mailer at python.org
Tue Aug 10 03:55:46 EDT 2021


https://github.com/python/cpython/commit/ede1dc416de5eece02170e03387dc8496c2d00ae
commit: ede1dc416de5eece02170e03387dc8496c2d00ae
branch: 3.9
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2021-08-10T09:55:39+02:00
summary:

bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27691)

files:
A Misc/NEWS.d/next/Core and Builtins/2021-08-09-16-16-03.bpo-44872.OKRlhK.rst
M Objects/frameobject.c

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 00000000000000..9a0d00018b2a7c
--- /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 50846dec50e8ec..4ae17bcfc2109e 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -575,7 +575,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++)
@@ -609,7 +609,7 @@ frame_dealloc(PyFrameObject *f)
     }
 
     Py_DECREF(co);
-    Py_TRASHCAN_SAFE_END(f)
+    Py_TRASHCAN_END;
 }
 
 static inline Py_ssize_t



More information about the Python-checkins mailing list