2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Handle reference<T> in make_function() calls.

[SVN r13840]
This commit is contained in:
Dave Abrahams
2002-05-13 16:35:07 +00:00
parent 97b863101b
commit dc1769b28a

View File

@@ -13,7 +13,11 @@
# include <boost/python/detail/indirect_traits.hpp>
# include <boost/mpl/select_type.hpp>
namespace boost { namespace python { namespace detail {
namespace boost { namespace python {
template <class T> class reference;
namespace detail {
// A function which converts its argument into a Python callable
// object. Not very general yet!
@@ -26,6 +30,9 @@ namespace boost { namespace python { namespace detail {
template <class F>
inline PyObject* wrap_function_aux(F f, PyObject*) { return f; }
template <class F, class T>
inline PyObject* wrap_function_aux(F f, boost::python::reference<T> x) { return x.release(); }
template <class F>
inline PyObject* wrap_function_aux(F f, ...) { return make_function(f); }