diff --git a/include/boost/python/converter/unwrap.hpp b/include/boost/python/converter/unwrap.hpp index 6dda61fb..4a2ea04c 100644 --- a/include/boost/python/converter/unwrap.hpp +++ b/include/boost/python/converter/unwrap.hpp @@ -11,6 +11,7 @@ # include # include # include +# include # include namespace boost { namespace python { namespace converter { @@ -55,7 +56,7 @@ struct unwrap_more_ : unwrap_base // unspecified storage which may be allocated by the unwrapper to // do value conversions. mutable void* m_storage; - friend class unwrapper; + typedef typename unwrapper_select::type unwrapper_t; }; // specialization for PyObject* @@ -142,32 +143,6 @@ unwrap_more_::unwrap_more_(PyObject* source) { } -# if 0 -template <> -inline unwrap_more_::unwrap_more_(PyObject* source, handle& prev) - : unwrap_base(source, m_unwrapper, prev) -{ -} - -template <> -inline unwrap_more_::unwrap_more_(PyObject* source) - : unwrap_base(source, m_unwrapper) - -{ -} - -template <> -inline PyObject* unwrap_more_::operator*() -{ - return source(); -} - -template <> -inline bool unwrap_more_::convertible(PyObject*) const -{ - return true; -} -# endif template inline unwrap_::unwrap_(PyObject* source) : unwrap_more_(source) @@ -178,7 +153,7 @@ template T unwrap_more_::operator*() { return static_cast*>( - get_body())->do_conversion(this); + get_body())->convert(this->m_source, this->m_storage); } template