mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40170: Always define PyIter_Check() as a function (GH-24548)
This commit is contained in:
parent
17dbd4078b
commit
cc54001c2e
5 changed files with 11 additions and 14 deletions
|
@ -2732,12 +2732,12 @@ PyObject_GetIter(PyObject *o)
|
|||
}
|
||||
}
|
||||
|
||||
#undef PyIter_Check
|
||||
|
||||
int PyIter_Check(PyObject *obj)
|
||||
int
|
||||
PyIter_Check(PyObject *obj)
|
||||
{
|
||||
return Py_TYPE(obj)->tp_iternext != NULL &&
|
||||
Py_TYPE(obj)->tp_iternext != &_PyObject_NextNotImplemented;
|
||||
PyTypeObject *tp = Py_TYPE(obj);
|
||||
return (tp->tp_iternext != NULL &&
|
||||
tp->tp_iternext != &_PyObject_NextNotImplemented);
|
||||
}
|
||||
|
||||
/* Return next item.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue