summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-01-29 18:22:11 (GMT)
committerGitHub <noreply@github.com>2020-01-29 18:22:11 (GMT)
commit5428f48b6308c7fd71636077f2ebc307c9a53d03 (patch)
treebb9f82164b4ed784fc04a6e74f5e33b38cc96e17
parentdb5e86adbce12350c26e7ffc2c6673369971a2dc (diff)
downloadcpython-5428f48b6308c7fd71636077f2ebc307c9a53d03.zip
cpython-5428f48b6308c7fd71636077f2ebc307c9a53d03.tar.gz
cpython-5428f48b6308c7fd71636077f2ebc307c9a53d03.tar.bz2
Remove deadcode in _Py_inc_count() (GH-18257)
(tp->tp_next != NULL) check became redundant with commit 45294a9562e5c360ee8ef8498d8792e05a6eb25e (merged in 2006).
-rw-r--r--Objects/object.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 6fc1146..14533db 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -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;