>boost::python::object cppobject(boost::python::handle<>(cObject));
It should work like this:
boost::python::object cppobject((boost::python::handle<>(cObject)));
(Not that I ever understood exactly why... (or even wanted to understand))
___
Cplus
Hello --
Trying to use pybindgen.gccxmlparser, and running into an issue with exception
handling.
I have a virtual class that declares
virtual int throw_error() throw (std::exception);
and a non-virtual class that extends the virtual class and overrides
throw_an_error to throw an actual error.
Murray Cumming wrote:
On Sun, 2010-02-07 at 22:59 +0100, Murray Cumming wrote:
Is there any easy way to get python Date, Time and DateTime values from
boost::python::objects? In C, I'm using PyDateTime_GET_YEAR(),
PyDateTime_GET_MONTH(), PyDateTime_GET_DAY(), etc, but it would be nice
to use som
On Sun, 2010-02-07 at 22:59 +0100, Murray Cumming wrote:
> Is there any easy way to get python Date, Time and DateTime values from
> boost::python::objects? In C, I'm using PyDateTime_GET_YEAR(),
> PyDateTime_GET_MONTH(), PyDateTime_GET_DAY(), etc, but it would be nice
> to use some C++ API for thi
On 02/11/2010 07:18 AM, Murray Cumming wrote:
On Fri, 2009-02-27 at 15:18 -0800, Alex Mohr wrote:
[snip]
If you have a PyObject *p and you want a bp::object,
construct it via:
object(handle<>(p)) // when p's a new reference
I find that I have to split the handle and objec
On Fri, 2009-02-27 at 15:18 -0800, Alex Mohr wrote:
[snip]
> If you have a PyObject *p and you want a bp::object,
> construct it via:
>
> object(handle<>(p)) // when p's a new reference
I find that I have to split the handle and object over two lines. If I
do this
boost::python::obj