MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_geti

Function lua_geti

src/Chain/libraries/glua/lapi.cpp:630–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 10

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

Calls 2

index2addrFunction · 0.85
luaV_finishgetFunction · 0.85

Tested by

no test coverage detected