fix doc example typo
[boost.git] / boost / python / object.hpp
blob9adec90f64beb6008eea4d59ad160cc06f4238ec
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)
5 #ifndef OBJECT_DWA2002612_HPP
6 # define OBJECT_DWA2002612_HPP
8 # include <boost/python/ssize_t.hpp>
9 # include <boost/python/object_core.hpp>
10 # include <boost/python/object_attributes.hpp>
11 # include <boost/python/object_items.hpp>
12 # include <boost/python/object_slices.hpp>
13 # include <boost/python/object_operators.hpp>
14 # include <boost/python/converter/arg_to_python.hpp>
16 namespace boost { namespace python {
18 inline ssize_t len(object const& obj)
20 ssize_t result = PyObject_Length(obj.ptr());
21 if (PyErr_Occurred()) throw_error_already_set();
22 return result;
25 }} // namespace boost::python
27 #endif // OBJECT_DWA2002612_HPP