File indexing completed on 2025-01-18 09:50:38
0001 # ifndef BOOST_PYTHON_SYNOPSIS
0002 #
0003 #
0004 #
0005 #
0006
0007 # if !defined(BOOST_PP_IS_ITERATING)
0008 # error Boost.Python - do not include this file!
0009 # endif
0010
0011 # define N BOOST_PP_ITERATION()
0012
0013 # define BOOST_PYTHON_MAKE_TUPLE_ARG(z, N, ignored) \
0014 PyTuple_SET_ITEM( \
0015 result.ptr() \
0016 , N \
0017 , python::incref(python::object(a##N).ptr()) \
0018 );
0019
0020 template <BOOST_PP_ENUM_PARAMS_Z(1, N, class A)>
0021 tuple
0022 make_tuple(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a))
0023 {
0024 tuple result((detail::new_reference)::PyTuple_New(N));
0025 BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_MAKE_TUPLE_ARG, _)
0026 return result;
0027 }
0028
0029 # undef BOOST_PYTHON_MAKE_TUPLE_ARG
0030
0031 # undef N
0032 # endif