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

Function luaH_setstr

other_src/lua/src/ltable.cpp:554–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552
553
554TValue *luaH_setstr (lua_State *L, Table *t, TString *key) {
555 const TValue *p = luaH_getstr(t, key);
556 if (p != luaO_nilobject) {
557 check_readonlyold(L, t, cast(TValue *, p)); /*BZ*/
558 return cast(TValue *, p);
559 }
560 else {
561 TValue k;
562 check_readonlynew(L, t); /*BZ*/
563 setsvalue(L, &k, key);
564 return newkey(L, t, &k);
565 }
566}
567
568
569static int unbound_search (Table *t, unsigned int j) {

Callers 2

adjust_varargsFunction · 0.70
luaX_newstringFunction · 0.70

Calls 2

luaH_getstrFunction · 0.70
newkeyFunction · 0.70

Tested by

no test coverage detected