Skip to content
Snippets Groups Projects
Commit 52915a4c authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Replace index:iterator() API with Lua-compatible pairs()

This patch converts space:iterator() to be compatible with Lua
for-in loop conventions. The most important change is that
generating function now returns *state* as its first result:

    for _state, val in space.index[0]:pairs() do work(val) end

New syntax follows the best practices of Lua community and makes
index API to be more consistent with pairs() and tuple iterators.

This change partially restores pairs() logic as it was implemented
before 49875615.
parent 641cfa61
No related branches found
No related tags found
No related merge requests found
Showing
with 169 additions and 101 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment