2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 19:12:16 +00:00

New conversion methods, builtin converters

----------------------------------------------------------------------

Committing in .

Modified Files:
	boost/python/reference_from_python.hpp
	boost/python/value_from_python.hpp
	boost/python/converter/body.hpp
	boost/python/converter/handle.hpp
	libs/python/src/converter/builtin_converters.cpp
	libs/python/test/m1.cpp libs/python/test/m2.cpp
Added Files:
	boost/python/converter/builtin_converters.hpp
	boost/python/converter/builtin_to_python_converters.hpp
	boost/python/converter/from_python.hpp
	boost/python/converter/from_python_data.hpp
	boost/python/converter/from_python_function.hpp
	boost/python/converter/to_python.hpp
	boost/python/converter/to_python_function.hpp
	boost/python/object/auto_ptr_generator.hpp
	boost/python/object/pointer_holder.hpp
	libs/python/src/converter/from_python.cpp
	libs/python/src/converter/to_python.cpp
	libs/python/test/test_builtin_converters.cpp
	libs/python/test/test_builtin_converters.py
Removed Files:
	boost/python/convert.hpp boost/python/converter/unwrap.hpp
	boost/python/converter/unwrapper.hpp
	boost/python/converter/wrap.hpp
	boost/python/converter/wrapper.hpp
	boost/python/object/class_unwrapper.hpp
----------------------------------------------------------------------


[SVN r12596]
This commit is contained in:
Dave Abrahams
2002-01-31 05:53:54 +00:00
parent 88a8721b89
commit 6a75fa83b5
26 changed files with 1259 additions and 661 deletions

View File

@@ -64,8 +64,11 @@ struct SimpleObject
{
PyObject_HEAD
simple x;
};
static simple& extract(SimpleObject& o) { return o.x; }
struct extract_simple_object
{
static simple& execute(SimpleObject& o) { return o.x; }
};
PyTypeObject SimpleType = {
@@ -209,12 +212,13 @@ BOOST_PYTHON_MODULE_INIT(m1)
&SimpleType
, simple
, SimpleObject
, &SimpleObject::extract
, extract_simple_object
>
unwrap_simple;
static to_python_converter<simple&> simple_ref_wrapper(simple_ref_to_python);
module m1("m1");
typedef boost::python::objects::pointer_holder_generator<