How to create Lua table from C-API like this:
TableName = {a, b, c}
How to set table name? I only know how to create table and put values, but don't know how to set name of table.
Code for creating table without name:
lua_createtable(L, 0, 3);
lua_pushnumber(L, 1);
lua_setfield(L, -2, "a");
lua_pushnumber(L, 2);
lua_setfield(L, -2, "b");
lua_pushnumber(L, 3);
lua_setfield(L, -2, "c");