MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaB_getfenv

Function luaB_getfenv

Source/Misc/lua/src/lua.c:10997–11004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10995
10996
10997static int luaB_getfenv (lua_State *L) {
10998getfunc(L, 1);
10999if (lua_iscfunction(L, -1)) /* is a C function? */
11000lua_pushvalue(L, LUA_GLOBALSINDEX); /* return the thread's global env. */
11001else
11002lua_getfenv(L, -1);
11003return 1;
11004}
11005
11006
11007static 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