Rev | Line | |
---|
[857] | 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 BOOST_PYTHON_API_PLACE_HOLDER_HPP
|
---|
| 6 | #define BOOST_PYTHON_API_PLACE_HOLDER_HPP
|
---|
| 7 |
|
---|
| 8 | namespace boost { namespace python {
|
---|
| 9 |
|
---|
| 10 | inline long len(object const& obj)
|
---|
| 11 | {
|
---|
| 12 | long result = PyObject_Length(obj.ptr());
|
---|
| 13 | if (PyErr_Occurred()) throw_error_already_set();
|
---|
| 14 | return result;
|
---|
| 15 | }
|
---|
| 16 | }} // namespace boost::python
|
---|
| 17 |
|
---|
| 18 | #endif // BOOST_PYTHON_API_PLACE_HOLDER_HPP
|
---|
Note: See
TracBrowser
for help on using the repository browser.