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

Function lua_getglobal

third-party/lua-5.2.4/src/lapi.c:608–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606
607
608LUA_API void lua_getglobal (lua_State *L, const char *var) {
609 Table *reg = hvalue(&G(L)->l_registry);
610 const TValue *gt; /* global table */
611 lua_lock(L);
612 gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
613 setsvalue2s(L, L->top++, luaS_new(L, var));
614 luaV_gettable(L, gt, L->top - 1, L->top - 1);
615 lua_unlock(L);
616}
617
618
619LUA_API void lua_gettable (lua_State *L, int idx) {

Callers 4

dolibraryFunction · 0.70
get_promptFunction · 0.70
dottyFunction · 0.70
luaB_printFunction · 0.70

Calls 3

luaH_getintFunction · 0.70
luaS_newFunction · 0.70
luaV_gettableFunction · 0.70

Tested by

no test coverage detected