sl@0
|
1 |
// Copyright David Abrahams 2002.
|
sl@0
|
2 |
// Distributed under the Boost Software License, Version 1.0. (See
|
sl@0
|
3 |
// accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
4 |
// http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
5 |
#ifndef OBJECT_DWA2002612_HPP
|
sl@0
|
6 |
# define OBJECT_DWA2002612_HPP
|
sl@0
|
7 |
|
sl@0
|
8 |
# include <boost/python/ssize_t.hpp>
|
sl@0
|
9 |
# include <boost/python/object_core.hpp>
|
sl@0
|
10 |
# include <boost/python/object_attributes.hpp>
|
sl@0
|
11 |
# include <boost/python/object_items.hpp>
|
sl@0
|
12 |
# include <boost/python/object_slices.hpp>
|
sl@0
|
13 |
# include <boost/python/object_operators.hpp>
|
sl@0
|
14 |
# include <boost/python/converter/arg_to_python.hpp>
|
sl@0
|
15 |
|
sl@0
|
16 |
namespace boost { namespace python {
|
sl@0
|
17 |
|
sl@0
|
18 |
inline ssize_t len(object const& obj)
|
sl@0
|
19 |
{
|
sl@0
|
20 |
ssize_t result = PyObject_Length(obj.ptr());
|
sl@0
|
21 |
if (PyErr_Occurred()) throw_error_already_set();
|
sl@0
|
22 |
return result;
|
sl@0
|
23 |
}
|
sl@0
|
24 |
|
sl@0
|
25 |
}} // namespace boost::python
|
sl@0
|
26 |
|
sl@0
|
27 |
#endif // OBJECT_DWA2002612_HPP
|