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

Function luaH_setstr

deps/lua/src/ltable.c:520–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518
519
520TValue *luaH_setstr (lua_State *L, Table *t, TString *key) {
521 const TValue *p = luaH_getstr(t, key);
522 if (p != luaO_nilobject)
523 return cast(TValue *, p);
524 else {
525 TValue k;
526 setsvalue(L, &k, key);
527 return newkey(L, t, &k);
528 }
529}
530
531
532static int unbound_search (Table *t, unsigned int j) {

Callers 2

luaX_newstringFunction · 0.85
adjust_varargsFunction · 0.85

Calls 2

luaH_getstrFunction · 0.85
newkeyFunction · 0.85

Tested by

no test coverage detected