Boost logo

Boost :

From: ¿ÂÃÍ (k.meng_at_[hidden])
Date: 2002-11-07 02:52:10


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;
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);

In this new version, what can I do for the same work? Please give me some examples,
Thank you very much!

Boost list run by bdawes at, gregod at, cpdaniel at, john at