aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-02-14 02:37:17 +0900
committerGitHub <noreply@github.com>2020-02-13 18:37:17 +0100
commitd905df766c367c350f20c46ccd99d4da19ed57d8 (patch)
tree9e08a6c88d6b0dd4e73810c3f3a152b61bd773aa /Include/iterobject.h
parentbpo-39573: Fix bad copy-paste in Py_SET_SIZE (GH-18496) (diff)
downloadcpython-d905df766c367c350f20c46ccd99d4da19ed57d8.tar.gz
cpython-d905df766c367c350f20c46ccd99d4da19ed57d8.tar.bz2
cpython-d905df766c367c350f20c46ccd99d4da19ed57d8.zip
bpo-39573: Add Py_IS_TYPE() function (GH-18488)
Co-Author: Neil Schemenauer <nas-github@arctrix.com>
Diffstat (limited to 'Include/iterobject.h')
-rw-r--r--Include/iterobject.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/iterobject.h b/Include/iterobject.h
index eec2ee271eb..51139bf1874 100644
--- a/Include/iterobject.h
+++ b/Include/iterobject.h
@@ -8,12 +8,12 @@ extern "C" {
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
-#define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type)
+#define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type)
PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);
-#define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type)
+#define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type)
PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);