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

Function lua_settable

extlibs/lua/src/lapi.c:813–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

811
812
813LUA_API void lua_settable (lua_State *L, int idx) {
814 TValue *t;
815 const TValue *slot;
816 lua_lock(L);
817 api_checknelems(L, 2);
818 t = index2value(L, idx);
819 if (luaV_fastget(L, t, s2v(L->top - 2), slot, luaH_get)) {
820 luaV_finishfastset(L, t, slot, s2v(L->top - 1));
821 }
822 else
823 luaV_finishset(L, t, s2v(L->top - 2), s2v(L->top - 1), slot);
824 L->top -= 2; /* pop index and value */
825 lua_unlock(L);
826}
827
828
829LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {

Callers 5

luaL_getsubtableFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setiFunction · 0.85
pushMethod · 0.85
field_setterClass · 0.85

Calls 2

index2valueFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by

no test coverage detected