mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
added missing typename and include file
[SVN r19448]
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
# include <boost/python/class.hpp>
|
||||
# include <boost/python/register_ptr_to_python.hpp>
|
||||
# include <boost/python/indexing/detail/indexing_suite_detail.hpp>
|
||||
# include <boost/python/iterator.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -119,8 +120,9 @@ namespace boost { namespace python {
|
||||
// Hook into the class_ generic visitation .def function
|
||||
register_ptr_to_python<container_element_t>();
|
||||
|
||||
Container::iterator(Container::*begin_)() = &Container::begin;
|
||||
Container::iterator(Container::*end_)() = &Container::end;
|
||||
typedef typename Container::iterator iterator;
|
||||
iterator(Container::*begin_)() = &Container::begin;
|
||||
iterator(Container::*end_)() = &Container::end;
|
||||
|
||||
cl
|
||||
.def("__len__", base_size)
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace boost { namespace python {
|
||||
long index = i();
|
||||
if (index < 0)
|
||||
index += DerivedPolicies::size(container);
|
||||
if (index >= container.size() || index < 0)
|
||||
if (index >= long(container.size()) || index < 0)
|
||||
{
|
||||
PyErr_SetString(PyExc_IndexError, "Index out of range");
|
||||
throw_error_already_set();
|
||||
|
||||
Reference in New Issue
Block a user