mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
subtype_dealloc(): Simplified overly contorted retracking logic. With
this change, I think subtype_dealloc is actually a smidgen less obscure than it was in 2.3 -- we got rid of a negation in an "if" <wink>.
This commit is contained in:
parent
f7f9e9966b
commit
0bd743cee1
1 changed files with 5 additions and 6 deletions
|
@ -690,12 +690,11 @@ subtype_dealloc(PyObject *self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finalize GC if the base doesn't do GC and we do */
|
/* Call the base tp_dealloc(); first retrack self if
|
||||||
_PyObject_GC_TRACK(self);
|
* basedealloc knows about gc.
|
||||||
if (!PyType_IS_GC(base))
|
*/
|
||||||
_PyObject_GC_UNTRACK(self);
|
if (PyType_IS_GC(base))
|
||||||
|
_PyObject_GC_TRACK(self);
|
||||||
/* Call the base tp_dealloc() */
|
|
||||||
assert(basedealloc);
|
assert(basedealloc);
|
||||||
basedealloc(self);
|
basedealloc(self);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue