Skip to content

Commit

Permalink
Python: Fix Series Compile
Browse files Browse the repository at this point in the history
Fix compile issue introduced during backporting.
  • Loading branch information
ax3l committed Aug 17, 2023
1 parent 2fdc3b8 commit 59b9c35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/binding/python/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ struct openPMD_PyMPICommObject
using openPMD_PyMPIIntracommObject = openPMD_PyMPICommObject;
#endif

struct SeriesIteratorPythonAdaptor : SeriesIterator
{
SeriesIteratorPythonAdaptor(SeriesIterator it)
: SeriesIterator(std::move(it))
{}

/*
* Python iterators are weird and call `__next__()` already for getting the
* first element.
* In that case, no `operator++()` must be called...
*/
bool first_iteration = true;
};

void init_Series(py::module &m)
{
py::class_<WriteIterations>(m, "WriteIterations", R"END(
Expand Down

0 comments on commit 59b9c35

Please sign in to comment.