MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaH_set_int

Function luaH_set_int

lua/ltable.c:589–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587
588
589TValue *luaH_set_int (lua_State *L, Table *t,
590 const TValue *key, TValue **foundkey) {
591 const TValue *p = luaH_get_int(t, key, foundkey);
592 t->flags = 0;
593 if (p != luaO_nilobject)
594 return cast(TValue *, p);
595 else {
596 if (ttisnil(key)) luaG_runerror(L, "table index is nil");
597 else if (ttisnumber(key) && luai_numisnan(nvalue(key)))
598 luaG_runerror(L, "table index is NaN");
599 return newkey(L, t, key);
600 }
601}
602
603
604TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {

Callers 2

luaV_settableFunction · 0.85
luaH_setFunction · 0.85

Calls 3

luaH_get_intFunction · 0.85
luaG_runerrorFunction · 0.85
newkeyFunction · 0.85

Tested by

no test coverage detected