]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/src/object/iterator.cpp
1 // Copyright David Abrahams 2002.
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)
6 #include <boost/python/object/iterator_core.hpp>
7 #include <boost/python/object/function_object.hpp>
8 #include <boost/bind.hpp>
9 #include <boost/mpl/vector/vector10.hpp>
11 namespace boost
{ namespace python
{ namespace objects
{
15 PyObject
* identity(PyObject
* args_
, PyObject
*)
17 PyObject
* x
= PyTuple_GET_ITEM(args_
,0);
23 BOOST_PYTHON_DECL object
const& identity_function()
27 py_function(&identity
, mpl::vector2
<PyObject
*,PyObject
*>())
33 void stop_iteration_error()
35 PyErr_SetObject(PyExc_StopIteration
, Py_None
);
36 throw_error_already_set();
39 }}} // namespace boost::python::objects