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

Function getGlobalTable

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

** The following function assumes that the registry cannot be a weak ** table; so, an emergency collection while using the global table ** cannot collect it. */

Source from the content-addressed store, hash-verified

689** cannot collect it.
690*/
691static void getGlobalTable (lua_State *L, TValue *gt) {
692 Table *registry = hvalue(&G(L)->l_registry);
693 lu_byte tag = luaH_getint(registry, LUA_RIDX_GLOBALS, gt);
694 (void)tag; /* avoid not-used warnings when checks are off */
695 api_check(L, novariant(tag) == LUA_TTABLE, "global table must exist");
696}
697
698
699LUA_API int lua_getglobal (lua_State *L, const char *name) {

Callers 3

lua_getglobalFunction · 0.85
lua_setglobalFunction · 0.85
lua_loadFunction · 0.85

Calls 1

luaH_getintFunction · 0.70

Tested by

no test coverage detected