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

Andreas Klöckner kloeckner at dam.brown.edu
Tue Jan 1 20:24:20 CET 2008


Hi Eric,

The attached patch fixes an exception propagation issue in the STL input 
iterator in Boost.Python. The problem is as follows: PyIter_Next may return 0 
for two reasons: 

- No more iterants left.
- An exception was caught.

The current implementation interprets the latter as the former. A simple fix 
(throw error_already_set if appropriate) is attached.

I'd appreciate it if you could commit this. If there are any issues, please 
let me know and I'll do my best to fix them.

Thanks,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bpl-stl-iterator-prop-ex-2007-12-20.patch
Type: text/x-diff
Size: 635 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080101/cd1e527d/attachment.patch>
-------------- 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/20080101/cd1e527d/attachment.pgp>


More information about the Cplusplus-sig mailing list