From 26a0df8253c07b4b6b17f5e38171eebfb25ffcf2 Mon Sep 17 00:00:00 2001 From: Paul Mensonides Date: Sun, 8 Sep 2002 22:03:22 +0000 Subject: [PATCH] pp-lib update [SVN r15214] --- include/boost/python/call.hpp | 2 +- include/boost/python/call_method.hpp | 2 +- include/boost/python/detail/make_tuple.hpp | 2 +- include/boost/python/detail/preprocessor.hpp | 8 ++++---- include/boost/python/detail/returning.hpp | 4 ++-- include/boost/python/init.hpp | 2 +- include/boost/python/object/make_holder.hpp | 4 ++-- include/boost/python/object/pointer_holder.hpp | 2 +- include/boost/python/object/value_holder.hpp | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/boost/python/call.hpp b/include/boost/python/call.hpp index 45ab7712..71da14cf 100644 --- a/include/boost/python/call.hpp +++ b/include/boost/python/call.hpp @@ -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).get() # define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, )) diff --git a/include/boost/python/call_method.hpp b/include/boost/python/call_method.hpp index 26b295d9..8eec759d 100644 --- a/include/boost/python/call_method.hpp +++ b/include/boost/python/call_method.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).get() # define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, )) diff --git a/include/boost/python/detail/make_tuple.hpp b/include/boost/python/detail/make_tuple.hpp index bbb67e07..41fcaa37 100644 --- a/include/boost/python/detail/make_tuple.hpp +++ b/include/boost/python/detail/make_tuple.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 \ diff --git a/include/boost/python/detail/preprocessor.hpp b/include/boost/python/detail/preprocessor.hpp index d55d44e6..89d1d26d 100644 --- a/include/boost/python/detail/preprocessor.hpp +++ b/include/boost/python/detail/preprocessor.hpp @@ -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 diff --git a/include/boost/python/detail/returning.hpp b/include/boost/python/detail/returning.hpp index 84609493..e0732e6b 100644 --- a/include/boost/python/detail/returning.hpp +++ b/include/boost/python/detail/returning.hpp @@ -78,10 +78,10 @@ struct returning # 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 c##n(PyTuple_GET_ITEM(args_, n)); \ if (!c##n.convertible()) \ return 0; diff --git a/include/boost/python/init.hpp b/include/boost/python/init.hpp index b00bd2d5..c931d701 100644 --- a/include/boost/python/init.hpp +++ b/include/boost/python/init.hpp @@ -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), \ diff --git a/include/boost/python/object/make_holder.hpp b/include/boost/python/object/make_holder.hpp index 1eab34e8..caa8e09f 100644 --- a/include/boost/python/object/make_holder.hpp +++ b/include/boost/python/object/make_holder.hpp @@ -25,11 +25,11 @@ namespace boost { namespace python { namespace objects { template struct make_holder; -# define BOOST_PYTHON_FORWARD_ARG(index, _) \ +# define BOOST_PYTHON_FORWARD_ARG(z, index, _) \ typedef typename mpl::at::type t##index; \ typedef typename forward::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, )) diff --git a/include/boost/python/object/pointer_holder.hpp b/include/boost/python/object/pointer_holder.hpp index d680df66..fa0d5384 100644 --- a/include/boost/python/object/pointer_holder.hpp +++ b/include/boost/python/object/pointer_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::type)(a##n) +# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)(a##n) template struct pointer_holder : instance_holder diff --git a/include/boost/python/object/value_holder.hpp b/include/boost/python/object/value_holder.hpp index 50477e3d..8552ba47 100644 --- a/include/boost/python/object/value_holder.hpp +++ b/include/boost/python/object/value_holder.hpp @@ -24,7 +24,7 @@ namespace boost { namespace python { namespace objects { -# define BOOST_PYTHON_UNFORWARD_LOCAL(n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)(a##n) +# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)(a##n) template struct value_holder : instance_holder