
9 Mar
2005
9 Mar
'05
8:13 p.m.
Marco Borm <mb.ml.boost@adisoft-systems.de> writes:
It is also possible to do the following in my c++ object-code: "ret = boost::python::call<int>(PyFunction.ptr(), this );"
But not so elegant or safe as: ret = boost::python::extract<int>( PyFunction( *this ) );
But now my problem: boost copies the object and passes only that copy to the function. Is it and how is it possible to make the object accessible to the function within the python-script?
ret = boost::python::extract<int>( PyFunction( boost::ref(*this) ) ); -- Dave Abrahams Boost Consulting www.boost-consulting.com