MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaB_getfenv

Function luaB_getfenv

deps/lua/src/lbaselib.c:133–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132
133static int luaB_getfenv (lua_State *L) {
134 getfunc(L, 1);
135 if (lua_iscfunction(L, -1)) /* is a C function? */
136 lua_pushvalue(L, LUA_GLOBALSINDEX); /* return the thread's global env. */
137 else
138 lua_getfenv(L, -1);
139 return 1;
140}
141
142
143static int luaB_setfenv (lua_State *L) {

Callers

nothing calls this directly

Calls 4

getfuncFunction · 0.85
lua_iscfunctionFunction · 0.85
lua_pushvalueFunction · 0.85
lua_getfenvFunction · 0.85

Tested by

no test coverage detected