mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
pp-lib update
[SVN r15214]
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(n, _) \
|
||||
# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(z, n, _) \
|
||||
, converter::arg_to_python<A##n>(a##n).get()
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/call.hpp>))
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(n, _) \
|
||||
# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(z, n, _) \
|
||||
, converter::arg_to_python<A##n>(a##n).get()
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/call_method.hpp>))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#define BOOST_PYTHON_MAKE_TUPLE_ARG(N, ignored) \
|
||||
#define BOOST_PYTHON_MAKE_TUPLE_ARG(z, N, ignored) \
|
||||
PyTuple_SET_ITEM( \
|
||||
result.ptr() \
|
||||
, N \
|
||||
|
||||
@@ -45,16 +45,16 @@
|
||||
|
||||
// enumerators
|
||||
# define BOOST_PYTHON_UNARY_ENUM(c, text) BOOST_PP_REPEAT(c, BOOST_PYTHON_UNARY_ENUM_I, text)
|
||||
# define BOOST_PYTHON_UNARY_ENUM_I(n, text) BOOST_PP_COMMA_IF(n) text ## n
|
||||
# define BOOST_PYTHON_UNARY_ENUM_I(z, n, text) BOOST_PP_COMMA_IF(n) text ## n
|
||||
|
||||
# define BOOST_PYTHON_BINARY_ENUM(c, a, b) BOOST_PP_REPEAT(c, BOOST_PYTHON_BINARY_ENUM_I, (a, b))
|
||||
# define BOOST_PYTHON_BINARY_ENUM_I(n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 1, _), n)
|
||||
# define BOOST_PYTHON_BINARY_ENUM_I(z, n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 1, _), n)
|
||||
|
||||
# define BOOST_PYTHON_ENUM_WITH_DEFAULT(c, text, def) BOOST_PP_REPEAT(c, BOOST_PYTHON_ENUM_WITH_DEFAULT_I, (text, def))
|
||||
# define BOOST_PYTHON_ENUM_WITH_DEFAULT_I(n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) = BOOST_PP_TUPLE_ELEM(2, 1, _)
|
||||
# define BOOST_PYTHON_ENUM_WITH_DEFAULT_I(z, n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) = BOOST_PP_TUPLE_ELEM(2, 1, _)
|
||||
|
||||
// fixed text (no commas)
|
||||
# define BOOST_PYTHON_FIXED(n, text) text
|
||||
# define BOOST_PYTHON_FIXED(z, n, text) text
|
||||
|
||||
// flags
|
||||
# define BOOST_PYTHON_FUNCTION_POINTER 0x0001
|
||||
|
||||
@@ -78,10 +78,10 @@ struct returning<void>
|
||||
|
||||
# define N BOOST_PP_ITERATION()
|
||||
|
||||
# define BOOST_PYTHON_CALL_ARGS(n, _) \
|
||||
# define BOOST_PYTHON_CALL_ARGS(z, n, _) \
|
||||
BOOST_PP_COMMA_IF(n) c##n(PyTuple_GET_ITEM(args_, n))
|
||||
|
||||
# define BOOST_PYTHON_CHECK_CONVERSION(n, _) \
|
||||
# define BOOST_PYTHON_CHECK_CONVERSION(z, n, _) \
|
||||
arg_from_python<A##n> c##n(PyTuple_GET_ITEM(args_, n)); \
|
||||
if (!c##n.convertible()) \
|
||||
return 0;
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace detail {
|
||||
// last in the list.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define BOOST_PYTHON_APPEND_TO_INIT(INDEX, D) \
|
||||
#define BOOST_PYTHON_APPEND_TO_INIT(z, INDEX, D) \
|
||||
typedef typename detail::append_to_init \
|
||||
< \
|
||||
BOOST_PP_CAT(l, INDEX), \
|
||||
|
||||
@@ -25,11 +25,11 @@ namespace boost { namespace python { namespace objects {
|
||||
|
||||
template <int nargs> struct make_holder;
|
||||
|
||||
# define BOOST_PYTHON_FORWARD_ARG(index, _) \
|
||||
# define BOOST_PYTHON_FORWARD_ARG(z, index, _) \
|
||||
typedef typename mpl::at<index,ArgList>::type t##index; \
|
||||
typedef typename forward<t##index>::type f##index;
|
||||
|
||||
# define BOOST_PYTHON_DO_FORWARD_ARG(index, _) , f##index(a##index)
|
||||
# define BOOST_PYTHON_DO_FORWARD_ARG(z, index, _) , f##index(a##index)
|
||||
|
||||
// specializations...
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/object/make_holder.hpp>))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace boost { namespace python { namespace objects {
|
||||
|
||||
# define BOOST_PYTHON_UNFORWARD_LOCAL(n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)(a##n)
|
||||
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)(a##n)
|
||||
|
||||
template <class Pointer, class Value>
|
||||
struct pointer_holder : instance_holder
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace boost { namespace python { namespace objects {
|
||||
|
||||
# define BOOST_PYTHON_UNFORWARD_LOCAL(n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)(a##n)
|
||||
# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward<A##n>::type)(a##n)
|
||||
|
||||
template <class Held>
|
||||
struct value_holder : instance_holder
|
||||
|
||||
Reference in New Issue
Block a user