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

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sun Dec 23 07:43:59 CET 2007


Ideas:

- write Erik Niebler directly (original author; may not monitor this list)

- provide a test that fails without the patch. E.g. add to the corresponding
  file in boost/libs/python/test.

Ralf

----- Original Message ----
From: Andreas Klöckner <lists at informa.tiker.net>
To: Development of Python/C++ integration <c++-sig at python.org>
Sent: Saturday, December 22, 2007 9:41:34 PM
Subject: Re: [C++-sig] [patch] STL input iterator does not propagate exceptions


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






More information about the Cplusplus-sig mailing list