]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove deadcode in _Py_inc_count() (GH-18257)
authorVictor Stinner <vstinner@python.org>
Wed, 29 Jan 2020 18:22:11 +0000 (19:22 +0100)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2020 18:22:11 +0000 (19:22 +0100)
(tp->tp_next != NULL) check became redundant with
commit 45294a9562e5c360ee8ef8498d8792e05a6eb25e (merged in 2006).

Objects/object.c

index 6fc114621c1d1d38fb9a93d0307cecbdd0216f26..14533dba16d64a7c1229ad03b4418b52e9ef0fb9 100644 (file)
@@ -182,8 +182,6 @@ _Py_inc_count(PyTypeObject *tp)
 {
     if (tp->tp_next == NULL && tp->tp_prev == NULL) {
         /* first time; insert in linked list */
-        if (tp->tp_next != NULL) /* sanity check */
-            Py_FatalError("XXX _Py_inc_count sanity check");
         if (type_list)
             type_list->tp_prev = tp;
         tp->tp_next = type_list;