Skip to content

Commit a47fbc1

Browse files
committed
Use PP lib for holders
[SVN r13447]
1 parent 47ad802 commit a47fbc1

File tree

9 files changed

+526
-737
lines changed

9 files changed

+526
-737
lines changed

include/boost/python/detail/preprocessor.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
# include <boost/config.hpp>
1010
# include <boost/preprocessor/tuple/to_list.hpp>
11+
# include <boost/preprocessor/tuple/elem.hpp>
1112
# include <boost/preprocessor/list/for_each.hpp>
1213
# include <boost/preprocessor/repeat_from_to_2nd.hpp>
1314
# include <boost/preprocessor/inc.hpp>
1415
# include <boost/preprocessor/empty.hpp>
16+
# include <boost/preprocessor/enum.hpp>
1517
# include <boost/preprocessor/expr_if.hpp>
1618

1719
namespace boost { namespace python { namespace detail {
@@ -83,6 +85,12 @@ namespace boost { namespace python { namespace detail {
8385
# define BOOST_PYTHON_REPEAT_MF_ALL_CV_2ND(function) \
8486
BOOST_PP_LIST_FOR_EACH(BOOST_PYTHON_REPEAT_PMF_CV,function,BOOST_PYTHON_ALL_CV)
8587

88+
#define BOOST_PYTHON_NUMBER_PAIR(Index, Pair) \
89+
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,Pair),Index) \
90+
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,Pair),Index)
91+
92+
#define BOOST_PYTHON_ENUM_PARAMS2(N, Pair) BOOST_PP_ENUM(N, BOOST_PYTHON_NUMBER_PAIR, Pair)
93+
8694

8795
}}} // namespace boost::python::detail
8896

include/boost/python/detail/signature.hpp

Lines changed: 0 additions & 217 deletions
This file was deleted.

include/boost/python/object/class.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ struct BOOST_PYTHON_DECL instance_holder : private noncopyable
5959
private:
6060
instance_holder* m_next;
6161
};
62+
// This macro is needed for implementation of derived holders
63+
# define BOOST_PYTHON_UNFORWARD(N,ignored) (typename unforward<A##N>::type)(a##N)
6264

6365
// Each extension instance will be one of these
6466
struct instance

0 commit comments

Comments
 (0)