MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaB_getfenv

Function luaB_getfenv

other_src/lua/src/lbaselib.cpp: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.70
lua_iscfunctionFunction · 0.70
lua_pushvalueFunction · 0.70
lua_getfenvFunction · 0.70

Tested by

no test coverage detected