MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / lua_setglobal

Function lua_setglobal

ThirdParty/lua/lua/lapi.c:721–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719
720
721LUA_API void lua_setglobal (lua_State *L, const char *name) {
722 Table *reg = hvalue(&G(L)->l_registry);
723 const TValue *gt; /* global table */
724 lua_lock(L);
725 api_checknelems(L, 1);
726 gt = luaH_getint(reg, LUA_RIDX_GLOBALS);
727 setsvalue2s(L, L->top++, luaS_new(L, name));
728 luaV_settable(L, gt, L->top - 1, L->top - 2);
729 L->top -= 2; /* pop value and key */
730 lua_unlock(L);
731}
732
733
734LUA_API void lua_settable (lua_State *L, int idx) {

Callers 4

RemoveGlobalFunction · 0.85
SetGlobalFunction · 0.85
luaL_requirefFunction · 0.85
luaopen_tableFunction · 0.85

Calls 4

luaH_getintFunction · 0.85
luaS_newFunction · 0.85
luaV_settableFunction · 0.85
GFunction · 0.50

Tested by

no test coverage detected