mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
GH-124715: Move trashcan mechanism into Py_Dealloc
(GH-132280)
This commit is contained in:
parent
0f23e84cda
commit
44e4c479fb
26 changed files with 88 additions and 196 deletions
|
@ -2511,9 +2511,8 @@ void
|
|||
PyObject_GC_UnTrack(void *op_raw)
|
||||
{
|
||||
PyObject *op = _PyObject_CAST(op_raw);
|
||||
/* Obscure: the Py_TRASHCAN mechanism requires that we be able to
|
||||
* call PyObject_GC_UnTrack twice on an object.
|
||||
*/
|
||||
/* The code for some objects, such as tuples, is a bit
|
||||
* sloppy about when the object is tracked and untracked. */
|
||||
if (_PyObject_GC_IS_TRACKED(op)) {
|
||||
_PyObject_GC_UNTRACK(op);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue