MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_gettable

Function lua_gettable

third-party/lua-5.4.6/src/lapi.c:674–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672
673
674LUA_API int lua_gettable (lua_State *L, int idx) {
675 const TValue *slot;
676 TValue *t;
677 lua_lock(L);
678 t = index2value(L, idx);
679 if (luaV_fastget(L, t, s2v(L->top.p - 1), slot, luaH_get)) {
680 setobj2s(L, L->top.p - 1, slot);
681 }
682 else
683 luaV_finishget(L, t, s2v(L->top.p - 1), L->top.p - 1, slot);
684 lua_unlock(L);
685 return ttype(s2v(L->top.p - 1));
686}
687
688
689LUA_API int lua_getfield (lua_State *L, int idx, const char *k) {

Callers 1

add_valueFunction · 0.70

Calls 2

index2valueFunction · 0.70
luaV_finishgetFunction · 0.70

Tested by

no test coverage detected