bpo-41117: Cleanup subtract_refs() (GH-27593)
subtract_refs() reuses the 'op' variable rather than calling the FROM_GC() macro twice. Issue reported by William Pickard.
This commit is contained in:
parent
cee67fa661
commit
c34fa2bb06
@ -479,9 +479,9 @@ subtract_refs(PyGC_Head *containers)
|
||||
for (; gc != containers; gc = GC_NEXT(gc)) {
|
||||
PyObject *op = FROM_GC(gc);
|
||||
traverse = Py_TYPE(op)->tp_traverse;
|
||||
(void) traverse(FROM_GC(gc),
|
||||
(visitproc)visit_decref,
|
||||
op);
|
||||
(void) traverse(op,
|
||||
(visitproc)visit_decref,
|
||||
op);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user