sl@0: // Copyright David Abrahams 2002. sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: #ifndef OBJECT_DWA2002612_HPP sl@0: # define OBJECT_DWA2002612_HPP sl@0: sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: sl@0: namespace boost { namespace python { sl@0: sl@0: inline ssize_t len(object const& obj) sl@0: { sl@0: ssize_t result = PyObject_Length(obj.ptr()); sl@0: if (PyErr_Occurred()) throw_error_already_set(); sl@0: return result; sl@0: } sl@0: sl@0: }} // namespace boost::python sl@0: sl@0: #endif // OBJECT_DWA2002612_HPP