[pypy-issue] [issue1182] [cpyext] PyObject_GetIter() does not validate the iterator it returns

Stefan Behnel tracker at bugs.pypy.org
Mon Jun 18 22:15:45 CEST 2012

Stefan Behnel <stefan_ml at behnel.de> added the comment:

I guessed that it did that. Are you suggesting that any type that has a next()
method would (or does) also have its tp_iternext slot set in PyType_Ready() and
vice versa? That might work then, although I would hope that this also applies
to dynamic changes. I can easily add a .next() method to a Python object that is
already referenced by a C extension, thus (potentially?) bypassing the validation.

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list