MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / auxgetstr

Function auxgetstr

extlibs/lua/src/lapi.c:609–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607
608
609static int auxgetstr (lua_State *L, const TValue *t, const char *k) {
610 const TValue *slot;
611 TString *str = luaS_new(L, k);
612 if (luaV_fastget(L, t, str, slot, luaH_getstr)) {
613 setobj2s(L, L->top, slot);
614 api_incr_top(L);
615 }
616 else {
617 setsvalue2s(L, L->top, str);
618 api_incr_top(L);
619 luaV_finishget(L, t, s2v(L->top - 1), L->top - 1, slot);
620 }
621 lua_unlock(L);
622 return ttype(s2v(L->top - 1));
623}
624
625
626LUA_API int lua_getglobal (lua_State *L, const char *name) {

Callers 2

lua_getglobalFunction · 0.85
lua_getfieldFunction · 0.85

Calls 2

luaS_newFunction · 0.85
luaV_finishgetFunction · 0.85

Tested by

no test coverage detected