From dc1769b28a7d453181d0bf31fb32457d9aa39445 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 13 May 2002 16:35:07 +0000 Subject: [PATCH] Handle reference in make_function() calls. [SVN r13840] --- include/boost/python/detail/wrap_function.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); }