[C++-sig] [boost.python] PyErr_Fetch and object

Olaf Peter ope-devel at gmx.de
Wed Aug 27 21:22:20 CEST 2008


Hi,

following http://www.python.org/doc/api/exceptionHandling.html,
PyErr_Fetch returns objects and I own these (if!= NULL).

I wrote:

bpl::object exception, value, tb;
PyErr_Fetch(&exception.ptr(), &value.ptr(), &tb.ptr());

which doesn't compile:

error: lvalue required as unary '&' operand

is there a way for this using bpl:object? Maybe I have to wrap this
after calling PyErr_Fetch?

Thanks,
Olaf



More information about the Cplusplus-sig mailing list