# HG changeset patch # User jbe # Date 1409090009 -7200 # Node ID 664736a8fcbf6600a491474b9cc0faede020df8e # Parent 3362ec36cb095bc1cc398b0d88a086f5b72959bf Included mode argument for seqlua_iterloop in README diff -r 3362ec36cb09 -r 664736a8fcbf README --- a/README Tue Aug 26 21:10:03 2014 +0200 +++ b/README Tue Aug 26 23:53:29 2014 +0200 @@ -261,9 +261,9 @@ In ``seqlualib.h``, the following macro is defined: - #define seqlua_iterloop(L, iter, idx) \ + #define seqlua_iterloop(L, iter, mode, idx) \ for ( \ - seqlua_iterinit((L), (iter), (idx)); \ + seqlua_iterinit((L), (iter), (mode), (idx)); \ seqlua_iternext(iter); \ ) @@ -271,7 +271,7 @@ #define seqlua_iterloopauto(L, iter, idx) \ for ( \ - seqlua_iterinit((L), (iter), (idx)); \ + seqlua_iterinit((L), (iter), (mode), (idx)); \ seqlua_iternext(iter); \ lua_pop((L), 1) \ ) @@ -281,7 +281,7 @@ int printcsv(lua_State *L) { seqlua_Iterator iter; - seqlua_iterloop(L, &iter, 1) { + seqlua_iterloop(L, &iter, SEQLUA_MODE_CALL, 1) { if (seqlua_itercount(&iter) > 1) fputs(",", stdout); fputs(luaL_tolstring(L, -1, NULL), stdout); // two values need to be popped (the value pushed by