Hi:
I'm now use the boost.python,and want to write my own
converter.
In the last version,I can write like this:
#include <boost/python/class_builder.hpp>
namespace python = boost::python; BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE
inline AsnInt from_python(PyObject* p, python::type<const
AsnInt&>)
{ return AsnInt(from_python(p, python::type<int>())); } inline AsnInt from_python(PyObject* p,
python::type<AsnInt>)
{ return from_python(p, python::type<const AsnInt&>()); } inline PyObject* to_python(const AsnInt&
ai)
{ return PyInt_FromLong((AsnIntType)ai); } BOOST_PYTHON_END_CONVERSION_NAMESPACE
In this new version, what can I do for the same work? Please
give me some examples,
Thank you very much!
kemeng |
- Re: [boost] help 柯猛
- Re: [boost] help David Abrahams
- [boost] help 柯猛
- Re: [boost] help David Abrahams