1 // Copyright David Abrahams 2002.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef REGISTER_PTR_TO_PYTHON_HPP
6 #define REGISTER_PTR_TO_PYTHON_HPP
8 #include <boost/python/pointee.hpp>
9 #include <boost/python/object.hpp>
10 #include <boost/python/object/class_wrapper.hpp>
12 namespace boost { namespace python {
15 void register_ptr_to_python()
17 typedef typename boost::python::pointee<P>::type X;
18 objects::class_value_wrapper<
20 , objects::make_ptr_instance<
22 , objects::pointer_holder<P,X>
27 }} // namespace boost::python
29 #endif // REGISTER_PTR_TO_PYTHON_HPP