mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 04:42:28 +00:00
Unwrap back_reference in get_pytype()
This prevents back_reference parameters from decaying to "object" in py signatures
This commit is contained in:
committed by
Stefan Seefeld
parent
4c6f40fb82
commit
0102b31945
@@ -9,7 +9,7 @@
|
||||
# include <boost/python/converter/registered.hpp>
|
||||
# include <boost/python/detail/unwind_type.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
# include <boost/python/back_reference.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -46,6 +46,12 @@ inline python::type_info unwind_type_id_(boost::type<T>* = 0, mpl::false_ * =0)
|
||||
return boost::python::detail::unwind_type<unwind_type_id_helper, T> ();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline python::type_info unwind_type_id_(boost::type<back_reference<T> >* = 0, mpl::false_ * =0)
|
||||
{
|
||||
return boost::python::detail::unwind_type<unwind_type_id_helper, T> ();
|
||||
}
|
||||
|
||||
inline python::type_info unwind_type_id_(boost::type<void>* = 0, mpl::true_* =0)
|
||||
{
|
||||
return type_id<void>();
|
||||
|
||||
@@ -214,6 +214,13 @@ joel kimpo
|
||||
... i.data()
|
||||
4
|
||||
|
||||
#####################################################################
|
||||
# Test signature...
|
||||
#####################################################################
|
||||
|
||||
>>> AMap.__iter__.__doc__.strip().split("\\n")[0]
|
||||
'__iter__( (AMap)arg1) -> __main__.iterator :'
|
||||
|
||||
#####################################################################
|
||||
# END....
|
||||
#####################################################################
|
||||
|
||||
Reference in New Issue
Block a user