Skip to content

Commit 12988b8

Browse files
committed
*** empty log message ***
[SVN r12627]
1 parent 684e391 commit 12988b8

4 files changed

Lines changed: 12 additions & 14 deletions

File tree

include/boost/python/copy_const_reference.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace detail
2121
;
2222
}
2323

24-
template <class T> struct to_python;
24+
template <class T> struct to_python_value;
2525

2626
struct copy_const_reference
2727
{
@@ -30,7 +30,7 @@ struct copy_const_reference
3030
{
3131
typedef typename mpl::select_type<
3232
detail::is_reference_to_const<T>::value
33-
, to_python<T>
33+
, to_python_value<T>
3434
, detail::copy_const_reference_expects_a_const_reference_return_type<T>
3535
>::type type;
3636
};

include/boost/python/copy_non_const_reference.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace detail
2121
;
2222
}
2323

24-
template <class T> struct to_python;
24+
template <class T> struct to_python_value;
2525

2626
struct copy_non_const_reference
2727
{
@@ -30,7 +30,7 @@ struct copy_non_const_reference
3030
{
3131
typedef typename mpl::select_type<
3232
boost::python::detail::is_reference_to_non_const<T>::value
33-
, to_python<T>
33+
, to_python_value<T>
3434
, detail::copy_non_const_reference_expects_a_non_const_reference_return_type<T>
3535
>::type type;
3636
};

include/boost/python/default_call_policies.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
# define DEFAULT_CALL_POLICIES_DWA2002131_HPP
88
# include <boost/python/detail/wrap_python.hpp>
99
# include <boost/mpl/select_type.hpp>
10+
# include <boost/python/to_python_value.hpp>
11+
# include <boost/type_traits/transform_traits.hpp>
1012

1113
namespace boost { namespace python {
1214

13-
template <class T> struct to_python;
15+
template <class T> struct to_python_value;
1416

1517
namespace detail
1618
{
@@ -49,7 +51,9 @@ struct default_result_converter
4951
typedef typename mpl::select_type<
5052
is_reference<R>::value | is_pointer<R>::value
5153
, detail::specify_a_result_policy_to_wrap_functions_returning<R>
52-
, to_python<R>
54+
, boost::python::to_python_value<
55+
typename add_reference<typename add_const<R>::type>::type
56+
>
5357
>::type type;
5458
};
5559
};
@@ -58,13 +62,13 @@ struct default_result_converter
5862
template <>
5963
struct default_result_converter::apply<char const*>
6064
{
61-
typedef boost::python::to_python<char const*> type;
65+
typedef boost::python::to_python_value<char const*const&> type;
6266
};
6367

6468
template <>
6569
struct default_result_converter::apply<PyObject*>
6670
{
67-
typedef boost::python::to_python<PyObject*> type;
71+
typedef boost::python::to_python_value<PyObject*const&> type;
6872
};
6973

7074
}} // namespace boost::python

include/boost/python/make_function.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# include <boost/python/converter/registration.hpp>
1212
# include <boost/python/detail/caller.hpp>
1313
# include <boost/python/detail/arg_tuple_size.hpp>
14-
# include <boost/python/detail/signature.hpp>
1514
# include <boost/mpl/size.hpp>
1615
# include <boost/function.hpp>
1716
# include <boost/bind.hpp>
@@ -22,7 +21,6 @@ namespace boost { namespace python {
2221
template <class F>
2322
objects::function* make_function(F f)
2423
{
25-
converter::acquire_registrations(detail::signature(f));
2624
return new objects::function(
2725
objects::py_function(
2826
::boost::bind<PyObject*>(detail::caller(), f, _1, _2, default_call_policies()))
@@ -32,7 +30,6 @@ objects::function* make_function(F f)
3230
template <class F, class Policies>
3331
objects::function* make_function(F f, Policies const& policies)
3432
{
35-
converter::acquire_registrations(detail::signature(f));
3633
return new objects::function(
3734
objects::py_function(
3835
::boost::bind<PyObject*>(detail::caller(), f, _1, _2, policies))
@@ -44,9 +41,6 @@ objects::function* make_constructor(T* = 0, ArgList* = 0, Generator* = 0)
4441
{
4542
enum { nargs = mpl::size<ArgList>::value };
4643

47-
typedef typename mpl::push_front<ArgList,void>::sequence signature;
48-
converter::acquire_registrations(signature());
49-
5044
return new objects::function(
5145
objects::py_function(
5246
::boost::bind<PyObject*>(detail::caller(),

0 commit comments

Comments
 (0)