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

Function lua_geti

extlibs/lua/src/lapi.c:654–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652
653
654LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) {
655 TValue *t;
656 const TValue *slot;
657 lua_lock(L);
658 t = index2value(L, idx);
659 if (luaV_fastgeti(L, t, n, slot)) {
660 setobj2s(L, L->top, slot);
661 }
662 else {
663 TValue aux;
664 setivalue(&aux, n);
665 luaV_finishget(L, t, &aux, L->top, slot);
666 }
667 api_incr_top(L);
668 lua_unlock(L);
669 return ttype(s2v(L->top - 1));
670}
671
672
673static int finishrawget (lua_State *L, const TValue *val) {

Callers 8

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

Calls 2

index2valueFunction · 0.85
luaV_finishgetFunction · 0.85

Tested by

no test coverage detected