]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/tuple.cpp
1 // Copyright David Abrahams 2005. Distributed under the Boost
2 // Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #include <boost/python/module.hpp>
6 #include <boost/python/def.hpp>
7 #include <boost/python/class.hpp>
8 #include <boost/python/tuple.hpp>
10 using namespace boost::python
;
12 object
convert_to_tuple(object data
)
17 void test_operators(tuple t1
, tuple t2
, object print
)
22 tuple
mktuple0() { return make_tuple(); }
23 tuple
mktuple1(int x
) { return make_tuple(x
); }
24 tuple
mktuple2(char const* a1
, int x
) { return make_tuple(a1
, x
); }
26 BOOST_PYTHON_MODULE(tuple_ext
)
28 def("convert_to_tuple",convert_to_tuple
);
29 def("test_operators",test_operators
);
30 def("make_tuple", mktuple0
);
31 def("make_tuple", mktuple1
);
32 def("make_tuple", mktuple2
);