How to create table in table in Lua 5.1 using C-API?
问题 I need to create construction like this in Lua 5.1 C-API, not in Lua 5.2 and above a = {["b"] = {["c"] = {["d"] = {["e"] = "GOOD"}}}} print(a.b.c.d.e); Expected Result: GOOD Thanks for answers! 回答1: The Lua C API is stack based. That means that the behavior of most of the C API functions depends not only on the arguments given, but also on the contents of the Lua stack (which is part of the lua_State* variable commonly called L ). What a particular API function expects in terms of stack