| 131 | |
| 132 | |
| 133 | static 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 | |
| 143 | static int luaB_setfenv (lua_State *L) { |
nothing calls this directly
no test coverage detected