diff --git a/include/boost/python/detail/wrap_function.hpp b/include/boost/python/detail/wrap_function.hpp index 0dcccd70..57725efd 100644 --- a/include/boost/python/detail/wrap_function.hpp +++ b/include/boost/python/detail/wrap_function.hpp @@ -13,7 +13,11 @@ # include # include -namespace boost { namespace python { namespace detail { +namespace boost { namespace python { + +template 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 inline PyObject* wrap_function_aux(F f, PyObject*) { return f; } +template +inline PyObject* wrap_function_aux(F f, boost::python::reference x) { return x.release(); } + template inline PyObject* wrap_function_aux(F f, ...) { return make_function(f); }