summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-09-22 10:42:28 (GMT)
committerGitHub <noreply@github.com>2020-09-22 10:42:28 (GMT)
commitc5cb077ab3c88394b7ac8ed4e746bd31b53e39f1 (patch)
tree57dbeb4d6ecfc189d8ce94e3971fb9bbfc974bd0 /Include/object.h
parent62e40d8450b9c78346ec3617de7fe3f0ad381510 (diff)
downloadcpython-c5cb077ab3c88394b7ac8ed4e746bd31b53e39f1.zip
cpython-c5cb077ab3c88394b7ac8ed4e746bd31b53e39f1.tar.gz
cpython-c5cb077ab3c88394b7ac8ed4e746bd31b53e39f1.tar.bz2
Py_IS_TYPE() macro uses Py_TYPE() (GH-22341)
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h
index 10f1d6a..6ee4ee7 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -141,7 +141,7 @@ static inline PyTypeObject* _Py_TYPE(const PyObject *ob) {
static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
- return ob->ob_type == type;
+ return Py_TYPE(ob) == type;
}
#define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST_CONST(ob), type)