# HG changeset patch # User jbe # Date 1408490565 -7200 # Node ID 22ec338adc20d5c5dedcefa5d98ee0b1edd715ba # Parent 0617c8368132dc27bc8b17de7c38b2f313a796c6 Documented seqlua_iterinit's extra element on stack in README diff -r 0617c8368132 -r 22ec338adc20 README --- a/README Wed Aug 20 01:14:37 2014 +0200 +++ b/README Wed Aug 20 01:22:45 2014 +0200 @@ -133,6 +133,10 @@ printcsv{"a", "b", "c"} -- prints: a,b,c +NOTE: ``seqlua_iterinit`` will store one extra element on the stack during +iteration. When ``seqlua_iternext`` returns 0, this extra element is popped +from the stack automatically. + Additionally, ``seqlualib`` includes a function ``seqlua_iterclosure(L, idx)``, which converts a table at a given stack index into a function closure (stored on the same stack index) that iterates over the elements of the table. If the