MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaH_set

Function luaH_set

Source/Misc/lua/src/lua.c:9734–9745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9732
9733
9734TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
9735const TValue *p = luaH_get(t, key);
9736t->flags = 0;
9737if (p != luaO_nilobject)
9738return cast(TValue *, p);
9739else {
9740if (ttisnil(key)) luaG_runerror(L, "table index is nil");
9741else if (ttisnumber(key) && luai_numisnan(nvalue(key)))
9742luaG_runerror(L, "table index is NaN");
9743return newkey(L, t, key);
9744}
9745}
9746
9747
9748TValue *luaH_setnum (lua_State *L, Table *t, int key) {

Callers 5

lua_rawsetFunction · 0.85
addkFunction · 0.85
resizeFunction · 0.85
newkeyFunction · 0.85
luaV_settableFunction · 0.85

Calls 3

luaH_getFunction · 0.85
luaG_runerrorFunction · 0.85
newkeyFunction · 0.85

Tested by

no test coverage detected