summaryrefslogtreecommitdiff
path: root/Include/iterobject.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 +0000
commit6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 (patch)
tree456e2e6b3d9d71e966f3b0e419ecfe44ce3c1fdd /Include/iterobject.h
parentb1994b4a5d0139a010eb0af1d6615a3df92fe786 (diff)
downloadcpython-git-6819210b9e4e5719a6f7f9c1725f8fa70a8936f6.tar.gz
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
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 c078ebb28b..8e17d35f4e 100644
--- a/Include/iterobject.h
+++ b/Include/iterobject.h
@@ -7,13 +7,13 @@ extern "C" {
PyAPI_DATA(PyTypeObject) PySeqIter_Type;
-#define PySeqIter_Check(op) ((op)->ob_type == &PySeqIter_Type)
+#define PySeqIter_Check(op) (Py_Type(op) == &PySeqIter_Type)
PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
-#define PyCallIter_Check(op) ((op)->ob_type == &PyCallIter_Type)
+#define PyCallIter_Check(op) (Py_Type(op) == &PyCallIter_Type)
PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);
#ifdef __cplusplus