Ik weet het bijna zeker, je zou dat aantal kunnen verhogen (8000 ) door LUAI_MAXCSTACK . te wijzigen waarde in luaconf.h . van uw omgeving en het opnieuw opbouwen (Lua-omgeving).
De standaard is, zoals je al hebt opgemerkt:
/*
@@ LUAI_MAXCSTACK limits the number of Lua stack slots that a C function
@* can use.
** CHANGE it if you need lots of (Lua) stack space for your C
** functions. This limit is arbitrary; its only purpose is to stop C
** functions to consume unlimited stack space. (must be smaller than
** -LUA_REGISTRYINDEX)
*/
#define LUAI_MAXCSTACK 8000
Alleen lijkt het een beetje op pornografie.
Hoe zit het met het gebruik van een tabel en iteratie door table.concat() brokken van <=8000 sleutels?