lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Rena, this example is extremely shortened. My goal is to decode json files full of tables.
for example, [[[[[[[[[[[[[]]]]]]]]]]]]]

2016-04-10 21:17 GMT+03:00 Rena <>:
On Sun, Apr 10, 2016 at 1:16 PM, Jura Pk <> wrote:
Hello, community!
I am stuck with a problem: when I'm trying to add 100 tables in Lua c stack, I receive segfault on function end.
Code example:

Maybe I'm doing it wrong? What setting I should increase to be able to add 100 tables?
local variables limit is 200 by default, registers limit is 254, so I don't get it.

static int lua_example_test( lua_State *L ) {
    for ( int i=0; i<100; i++ ) {
    return 1;

What are you trying to achieve here? You're creating 100 tables but doing nothing with them, then only returning one?

Sent from my Game Boy.