MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lua_geti

Function lua_geti

lib/lua/src/lapi.c:695–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693
694
695LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) {
696 TValue *t;
697 const TValue *slot;
698 lua_lock(L);
699 t = index2value(L, idx);
700 if (luaV_fastgeti(L, t, n, slot)) {
701 setobj2s(L, L->top.p, slot);
702 }
703 else {
704 TValue aux;
705 setivalue(&aux, n);
706 luaV_finishget(L, t, &aux, L->top.p, slot);
707 }
708 api_incr_top(L);
709 lua_unlock(L);
710 return ttype(s2v(L->top.p - 1));
711}
712
713
714l_sinline int finishrawget (lua_State *L, const TValue *val) {

Callers 9

ipairsauxFunction · 0.85
tinsertFunction · 0.85
tremoveFunction · 0.85
tmoveFunction · 0.85
addfieldFunction · 0.85
tunpackFunction · 0.85
partitionFunction · 0.85
auxsortFunction · 0.85
luaTableHandleManyFunction · 0.85

Calls 2

index2valueFunction · 0.85
luaV_finishgetFunction · 0.85

Tested by

no test coverage detected