From caf661cfeb44e2468df9eaa1b12b3124e733f832 Mon Sep 17 00:00:00 2001 From: Haoyu Bai Date: Wed, 27 May 2009 19:43:52 +0000 Subject: [PATCH] fix for next() -> __next__() name change in py3k [SVN r53322] --- include/boost/python/object/iterator.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/python/object/iterator.hpp b/include/boost/python/object/iterator.hpp index 3e24afd2..ab748fe8 100644 --- a/include/boost/python/object/iterator.hpp +++ b/include/boost/python/object/iterator.hpp @@ -129,7 +129,11 @@ namespace detail return class_(name, no_init) .def("__iter__", identity_function()) .def( +#if PY_VERSION_HEX >= 0x03000000 + "__next__" +#else "next" +#endif , make_function( next_fn() , policies