[Python-checkins] bpo-39873: Cleanup _PyObject_CheckConsistency() (GH-18807)
Victor Stinner
webhook-mailer at python.org
Fri Mar 6 12:57:53 EST 2020
https://github.com/python/cpython/commit/9a73705a1d0cb8b89d0a20add2ffa2c4d32950ed
commit: 9a73705a1d0cb8b89d0a20add2ffa2c4d32950ed
branch: master
author: Victor Stinner <vstinner at python.org>
committer: GitHub <noreply at github.com>
date: 2020-03-06T18:57:48+01:00
summary:
bpo-39873: Cleanup _PyObject_CheckConsistency() (GH-18807)
Remove redundant check on Py_TYPE() value: it's already checked
inside _PyType_CheckConsistency().
files:
M Objects/object.c
diff --git a/Objects/object.c b/Objects/object.c
index 707424c98fe7d..8314a08150e2d 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -33,7 +33,6 @@ _PyObject_CheckConsistency(PyObject *op, int check_content)
CHECK(!_PyObject_IsFreed(op));
CHECK(Py_REFCNT(op) >= 1);
- CHECK(Py_TYPE(op) != NULL);
_PyType_CheckConsistency(Py_TYPE(op));
if (PyUnicode_Check(op)) {
More information about the Python-checkins
mailing list