2
0
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:
Dave Abrahams
2002-07-18 15:17:08 +00:00
parent 94edc13393
commit dfd85da9d7
18 changed files with 1419 additions and 537 deletions

20
src/tuple.cpp Normal file
View 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