|
41 | 41 |
|
42 | 42 | namespace boost { namespace python { namespace detail { |
43 | 43 |
|
44 | | -# if 0 // argpkg |
45 | | -template <class N> |
46 | | -inline PyObject* get(N, PyObject* const& args_) |
47 | | -{ |
48 | | - return PyTuple_GET_ITEM(args_,N::value); |
49 | | -} |
50 | | -# else |
51 | | -template <unsigned N> |
52 | | -inline PyObject* get(PyObject* const& args_ BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(unsigned,N)) |
| 44 | +template <int N> |
| 45 | +inline PyObject* get(mpl::int_<N>, PyObject* const& args_) |
53 | 46 | { |
54 | 47 | return PyTuple_GET_ITEM(args_,N); |
55 | 48 | } |
56 | | -# endif |
57 | 49 |
|
58 | 50 | inline unsigned arity(PyObject* const& args_) |
59 | 51 | { |
@@ -106,21 +98,12 @@ struct caller; |
106 | 98 | # define BOOST_PYTHON_NEXT(init,name,n) \ |
107 | 99 | typedef BOOST_PP_IF(n,typename BOOST_PP_CAT(name,BOOST_PP_DEC(n)) ::next, init) name##n; |
108 | 100 |
|
109 | | -# if 0 // argpkg |
110 | 101 | # define BOOST_PYTHON_ARG_CONVERTER(n) \ |
111 | 102 | BOOST_PYTHON_NEXT(typename first::next, arg_iter,n) \ |
112 | 103 | typedef arg_from_python<BOOST_DEDUCED_TYPENAME arg_iter##n::type> c_t##n; \ |
113 | 104 | c_t##n c##n(get(mpl::int_<n>(), inner_args)); \ |
114 | 105 | if (!c##n.convertible()) \ |
115 | 106 | return 0; |
116 | | -# else |
117 | | -# define BOOST_PYTHON_ARG_CONVERTER(n) \ |
118 | | - BOOST_PYTHON_NEXT(typename first::next, arg_iter,n) \ |
119 | | - typedef arg_from_python<BOOST_DEDUCED_TYPENAME arg_iter##n::type> c_t##n; \ |
120 | | - c_t##n c##n(get<n>(inner_args)); \ |
121 | | - if (!c##n.convertible()) \ |
122 | | - return 0; |
123 | | -# endif |
124 | 107 |
|
125 | 108 | # define BOOST_PP_ITERATION_PARAMS_1 \ |
126 | 109 | (3, (0, BOOST_PYTHON_MAX_ARITY + 1, <boost/python/detail/caller.hpp>)) |
|
0 commit comments