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

Function lua_gettable

extlibs/lua/src/lapi.c:633–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631
632
633LUA_API int lua_gettable (lua_State *L, int idx) {
634 const TValue *slot;
635 TValue *t;
636 lua_lock(L);
637 t = index2value(L, idx);
638 if (luaV_fastget(L, t, s2v(L->top - 1), slot, luaH_get)) {
639 setobj2s(L, L->top - 1, slot);
640 }
641 else
642 luaV_finishget(L, t, s2v(L->top - 1), L->top - 1, slot);
643 lua_unlock(L);
644 return ttype(s2v(L->top - 1));
645}
646
647
648LUA_API int lua_getfield (lua_State *L, int idx, const char *k) {

Callers 6

add_valueFunction · 0.85
luaL_getsubtableFunction · 0.85
lua_getiFunction · 0.85
getMethod · 0.85
getMethod · 0.85
field_getterClass · 0.85

Calls 2

index2valueFunction · 0.85
luaV_finishgetFunction · 0.85

Tested by

no test coverage detected