MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaH_setnum

Function luaH_setnum

other_src/lua/src/ltable.cpp:539–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537
538
539TValue *luaH_setnum (lua_State *L, Table *t, int key) {
540 const TValue *p = luaH_getnum(t, key);
541 if (p != luaO_nilobject) {
542 check_readonlyold(L, t, cast(TValue *, p)); /*BZ*/
543 return cast(TValue *, p);
544 }
545 else {
546 TValue k;
547 check_readonlynew(L, t); /*BZ*/
548 setnvalue(&k, cast_num(key));
549 return newkey(L, t, &k);
550 }
551}
552
553
554TValue *luaH_setstr (lua_State *L, Table *t, TString *key) {

Callers 5

collectvalidlinesFunction · 0.70
adjust_varargsFunction · 0.70
luaV_executeFunction · 0.70
resizeFunction · 0.70
lua_rawsetiFunction · 0.70

Calls 2

luaH_getnumFunction · 0.70
newkeyFunction · 0.70

Tested by

no test coverage detected