From 6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 21 Jul 2007 06:55:02 +0000 Subject: PEP 3123: Provide forward compatibility with Python 3.0, while keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. --- Include/iterobject.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Include/iterobject.h') 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 -- cgit v1.2.1