mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
str, dict, and tuple!
[SVN r14517]
This commit is contained in:
20
src/tuple.cpp
Normal file
20
src/tuple.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <boost/python/tuple.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
BOOST_PYTHON_DECL detail::new_reference tuple::call(object const& arg)
|
||||
{
|
||||
return (detail::new_reference)PyObject_CallFunction(
|
||||
(PyObject*)&PyTuple_Type, "(O)",
|
||||
arg.ptr());
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL tuple::tuple()
|
||||
: object(detail::new_reference(PyTuple_New(0)))
|
||||
{}
|
||||
|
||||
BOOST_PYTHON_DECL tuple::tuple(object_cref sequence)
|
||||
: object(tuple::call(sequence))
|
||||
{}
|
||||
|
||||
}} // namespace boost::python
|
||||
Reference in New Issue
Block a user