MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaL_getsubtable

Function luaL_getsubtable

extlibs/sol3/include/sol/sol.hpp:2625–2638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2623}
2624
2625COMPAT53_API int luaL_getsubtable(lua_State *L, int i, const char *name) {
2626 int abs_i = lua_absindex(L, i);
2627 luaL_checkstack(L, 3, "not enough stack slots");
2628 lua_pushstring(L, name);
2629 lua_gettable(L, abs_i);
2630 if (lua_istable(L, -1))
2631 return 1;
2632 lua_pop(L, 1);
2633 lua_newtable(L);
2634 lua_pushstring(L, name);
2635 lua_pushvalue(L, -2);
2636 lua_settable(L, abs_i);
2637 return 0;
2638}
2639
2640COMPAT53_API lua_Integer luaL_len(lua_State *L, int i) {
2641 lua_Integer res = 0;

Callers 1

luaL_requirefFunction · 0.70

Calls 6

lua_pushstringFunction · 0.85
lua_gettableFunction · 0.85
lua_pushvalueFunction · 0.85
lua_settableFunction · 0.85
lua_absindexFunction · 0.70
luaL_checkstackFunction · 0.70

Tested by

no test coverage detected