|
Last change
on this file since 35 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
851 bytes
|
| Line | |
|---|
| 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 |
|---|
| 7 | |
|---|
| 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> |
|---|
| 15 | |
|---|
| 16 | namespace boost { namespace python { |
|---|
| 17 | |
|---|
| 18 | inline ssize_t len(object const& obj) |
|---|
| 19 | { |
|---|
| 20 | ssize_t result = PyObject_Length(obj.ptr()); |
|---|
| 21 | if (PyErr_Occurred()) throw_error_already_set(); |
|---|
| 22 | return result; |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | }} // namespace boost::python |
|---|
| 26 | |
|---|
| 27 | #endif // OBJECT_DWA2002612_HPP |
|---|
Note: See
TracBrowser
for help on using the repository browser.