Haibo Huang | d883030 | 2020-03-03 10:09:46 -0800 | [diff] [blame] | 1 | #ifndef Py_ITEROBJECT_H |
| 2 | #define Py_ITEROBJECT_H |
| 3 | /* Iterators (the basic kind, over a sequence) */ |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | PyAPI_DATA(PyTypeObject) PySeqIter_Type; |
| 9 | PyAPI_DATA(PyTypeObject) PyCallIter_Type; |
Yi Kong | 7119932 | 2022-08-30 15:53:45 +0800 | [diff] [blame] | 10 | #ifdef Py_BUILD_CORE |
| 11 | extern PyTypeObject _PyAnextAwaitable_Type; |
| 12 | #endif |
Haibo Huang | d883030 | 2020-03-03 10:09:46 -0800 | [diff] [blame] | 13 | |
Haibo Huang | 5eba2b4 | 2021-01-22 11:22:02 -0800 | [diff] [blame] | 14 | #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type) |
Haibo Huang | d883030 | 2020-03-03 10:09:46 -0800 | [diff] [blame] | 15 | |
| 16 | PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); |
| 17 | |
| 18 | |
Haibo Huang | 5eba2b4 | 2021-01-22 11:22:02 -0800 | [diff] [blame] | 19 | #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type) |
Haibo Huang | d883030 | 2020-03-03 10:09:46 -0800 | [diff] [blame] | 20 | |
| 21 | PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); |
| 22 | |
| 23 | #ifdef __cplusplus |
| 24 | } |
| 25 | #endif |
| 26 | #endif /* !Py_ITEROBJECT_H */ |
| 27 | |