1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/python/object.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,27 @@
1.4 +// Copyright David Abrahams 2002.
1.5 +// Distributed under the Boost Software License, Version 1.0. (See
1.6 +// accompanying file LICENSE_1_0.txt or copy at
1.7 +// http://www.boost.org/LICENSE_1_0.txt)
1.8 +#ifndef OBJECT_DWA2002612_HPP
1.9 +# define OBJECT_DWA2002612_HPP
1.10 +
1.11 +# include <boost/python/ssize_t.hpp>
1.12 +# include <boost/python/object_core.hpp>
1.13 +# include <boost/python/object_attributes.hpp>
1.14 +# include <boost/python/object_items.hpp>
1.15 +# include <boost/python/object_slices.hpp>
1.16 +# include <boost/python/object_operators.hpp>
1.17 +# include <boost/python/converter/arg_to_python.hpp>
1.18 +
1.19 +namespace boost { namespace python {
1.20 +
1.21 + inline ssize_t len(object const& obj)
1.22 + {
1.23 + ssize_t result = PyObject_Length(obj.ptr());
1.24 + if (PyErr_Occurred()) throw_error_already_set();
1.25 + return result;
1.26 + }
1.27 +
1.28 +}} // namespace boost::python
1.29 +
1.30 +#endif // OBJECT_DWA2002612_HPP