[C++-sig] [patch] STL input iterator does not propagate exceptions

Andreas Klöckner lists at informa.tiker.net
Sun Dec 23 06:41:34 CET 2007


On Freitag 21 Dezember 2007, Andreas Klöckner wrote:
> Hi all,
>
> I get a segfault if I use boost::python::stl_input_iterator from C++, and
> the Python code (a generator or some such) that I iterate off of raises an
> exception (such as KeyboardInterrupt, which makes it easy to test). This is
> because a NULL return from PyIter_Next is always interpreted as "end of
> list", and not as the error that it may well be.
>
> Attached patch fixes this.
>
> Andreas

Can somebody please just commit this? It fixes a pretty obvious bug.

Thanks
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071223/0356d572/attachment.pgp>


More information about the Cplusplus-sig mailing list