File tree Expand file tree Collapse file tree
include/boost/python/object Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99# include < boost/python/detail/wrap_python.hpp>
1010# include < boost/python/detail/config.hpp>
11+ # include < boost/python/reference.hpp>
1112# include < boost/function.hpp>
1213
13- namespace boost { namespace python { namespace object {
14+ namespace boost { namespace python { namespace objects {
1415
1516// We use boost::function to avoid generating lots of virtual tables
1617typedef boost::function2<PyObject*, PyObject*, PyObject*> py_function;
1718
1819struct BOOST_PYTHON_DECL function : PyObject
1920{
20- function (py_function);
21+ function (py_function, unsigned min_args, unsigned max_args = 0 );
2122 ~function ();
2223
2324 PyObject* call (PyObject*, PyObject*) const ;
24- private:
25+ void add_overload (function* overload);
26+
27+ private: // helper functions
28+ void argument_error (PyObject* args, PyObject* keywords) const ;
29+
30+ private: // data members
2531 py_function m_fn;
32+ unsigned m_min_args;
33+ unsigned m_max_args;
34+ function* m_overloads;
2635};
2736
2837extern BOOST_PYTHON_DECL PyTypeObject function_type;
@@ -31,6 +40,6 @@ extern BOOST_PYTHON_DECL PyTypeObject function_type;
3140// implementations
3241//
3342
34- }}} // namespace boost::python::object
43+ }}} // namespace boost::python::objects
3544
3645#endif // FUNCTION_DWA20011214_HPP
You can’t perform that action at this time.
0 commit comments