diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-21 15:45:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 15:45:14 (GMT) |
commit | fda88864980ffce57add0ea03fb9cbda2798975e (patch) | |
tree | 19df73c680561d058734983aa982b232871d28c6 /Objects | |
parent | 595225e86dcc6ea520a584839925a878dce7a9b2 (diff) | |
download | cpython-fda88864980ffce57add0ea03fb9cbda2798975e.zip cpython-fda88864980ffce57add0ea03fb9cbda2798975e.tar.gz cpython-fda88864980ffce57add0ea03fb9cbda2798975e.tar.bz2 |
bpo-46417: Revert remove_subclass() change (GH-30750)
remove_subclass() doesn't clear the tp_subclasses dict if the dict
becomes empty.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 97a9a65..34a9817 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -6553,10 +6553,6 @@ remove_subclass(PyTypeObject *base, PyTypeObject *type) PyErr_Clear(); } Py_XDECREF(key); - - if (PyDict_Size(dict) == 0) { - Py_CLEAR(base->tp_subclasses); - } } static void |