MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_getglobal

Function lua_getglobal

freebsd/contrib/openzfs/module/lua/lapi.c:605–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

luaSortArrayFunction · 0.85
scriptingInitFunction · 0.85
evalGenericCommandFunction · 0.85
ldbPrintFunction · 0.85
ldbRedisFunction · 0.85
dolibraryFunction · 0.85
dottyFunction · 0.85
luaB_printFunction · 0.85

Calls 3

luaH_getintFunction · 0.85
luaS_newFunction · 0.85
luaV_gettableFunction · 0.70

Tested by

no test coverage detected