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

Function lua_geti

third-party/lua-5.3.5/src/lapi.c:628–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626
627
628LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) {
629 StkId t;
630 const TValue *slot;
631 lua_lock(L);
632 t = index2addr(L, idx);
633 if (luaV_fastget(L, t, n, slot, luaH_getint)) {
634 setobj2s(L, L->top, slot);
635 api_incr_top(L);
636 }
637 else {
638 setivalue(L->top, n);
639 api_incr_top(L);
640 luaV_finishget(L, t, L->top - 1, L->top - 1, slot);
641 }
642 lua_unlock(L);
643 return ttnov(L->top - 1);
644}
645
646
647LUA_API int lua_rawget (lua_State *L, int idx) {

Callers 8

ipairsauxFunction · 0.70
tinsertFunction · 0.70
tremoveFunction · 0.70
tmoveFunction · 0.70
addfieldFunction · 0.70
unpackFunction · 0.70
partitionFunction · 0.70
auxsortFunction · 0.70

Calls 2

index2addrFunction · 0.70
luaV_finishgetFunction · 0.70

Tested by

no test coverage detected