summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-21 15:45:14 (GMT)
committerGitHub <noreply@github.com>2022-01-21 15:45:14 (GMT)
commitfda88864980ffce57add0ea03fb9cbda2798975e (patch)
tree19df73c680561d058734983aa982b232871d28c6 /Objects
parent595225e86dcc6ea520a584839925a878dce7a9b2 (diff)
downloadcpython-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.c4
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