MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaH_set

Function luaH_set

deps/lua/src/ltable.c:494–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492
493
494TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
495 const TValue *p = luaH_get(t, key);
496 t->flags = 0;
497 if (p != luaO_nilobject)
498 return cast(TValue *, p);
499 else {
500 if (ttisnil(key)) luaG_runerror(L, "table index is nil");
501 else if (ttisnumber(key) && luai_numisnan(nvalue(key)))
502 luaG_runerror(L, "table index is NaN");
503 return newkey(L, t, key);
504 }
505}
506
507
508TValue *luaH_setnum (lua_State *L, Table *t, int key) {

Callers 5

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

Calls 3

luaH_getFunction · 0.85
luaG_runerrorFunction · 0.85
newkeyFunction · 0.85

Tested by

no test coverage detected