Line | |
---|
1 | // Copyright David Abrahams 2004. |
---|
2 | // Distributed under the Boost Software License, Version 1.0. (See |
---|
3 | // accompanying file LICENSE_1_0.txt or copy at |
---|
4 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | #include <boost/python/tuple.hpp> |
---|
6 | |
---|
7 | namespace boost { namespace python { namespace detail { |
---|
8 | |
---|
9 | detail::new_reference tuple_base::call(object const& arg_) |
---|
10 | { |
---|
11 | return (detail::new_reference)PyObject_CallFunction( |
---|
12 | (PyObject*)&PyTuple_Type, "(O)", |
---|
13 | arg_.ptr()); |
---|
14 | } |
---|
15 | |
---|
16 | tuple_base::tuple_base() |
---|
17 | : object(detail::new_reference(PyTuple_New(0))) |
---|
18 | {} |
---|
19 | |
---|
20 | tuple_base::tuple_base(object_cref sequence) |
---|
21 | : object(call(sequence)) |
---|
22 | {} |
---|
23 | |
---|
24 | }}} // namespace boost::python |
---|
Note: See
TracBrowser
for help on using the repository browser.