MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / lua_settable

Function lua_settable

lua/src/lapi.c:859–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857
858
859LUA_API void lua_settable (lua_State *L, int idx) {
860 TValue *t;
861 const TValue *slot;
862 lua_lock(L);
863 api_checknelems(L, 2);
864 t = index2value(L, idx);
865 if (luaV_fastget(L, t, s2v(L->top - 2), slot, luaH_get)) {
866 luaV_finishfastset(L, t, slot, s2v(L->top - 1));
867 }
868 else
869 luaV_finishset(L, t, s2v(L->top - 2), s2v(L->top - 1), slot);
870 L->top -= 2; /* pop index and value */
871 lua_unlock(L);
872}
873
874
875LUA_API void lua_setfield (lua_State *L, int idx, const char *k) {

Callers

nothing calls this directly

Calls 2

index2valueFunction · 0.85
luaV_finishsetFunction · 0.85

Tested by

no test coverage detected