MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / auxgetstr

Function auxgetstr

third-party/lua-5.5.0/src/lapi.c:670–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668
669
670static int auxgetstr (lua_State *L, const TValue *t, const char *k) {
671 lu_byte tag;
672 TString *str = luaS_new(L, k);
673 luaV_fastget(t, str, s2v(L->top.p), luaH_getstr, tag);
674 if (!tagisempty(tag))
675 api_incr_top(L);
676 else {
677 setsvalue2s(L, L->top.p, str);
678 api_incr_top(L);
679 tag = luaV_finishget(L, t, s2v(L->top.p - 1), L->top.p - 1, tag);
680 }
681 lua_unlock(L);
682 return novariant(tag);
683}
684
685
686/*

Callers 2

lua_getglobalFunction · 0.70
lua_getfieldFunction · 0.70

Calls 2

luaS_newFunction · 0.70
luaV_finishgetFunction · 0.70

Tested by

no test coverage detected