| 10995 | |
| 10996 | |
| 10997 | static int luaB_getfenv (lua_State *L) { |
| 10998 | getfunc(L, 1); |
| 10999 | if (lua_iscfunction(L, -1)) /* is a C function? */ |
| 11000 | lua_pushvalue(L, LUA_GLOBALSINDEX); /* return the thread's global env. */ |
| 11001 | else |
| 11002 | lua_getfenv(L, -1); |
| 11003 | return 1; |
| 11004 | } |
| 11005 | |
| 11006 | |
| 11007 | static int luaB_setfenv (lua_State *L) { |
nothing calls this directly
no test coverage detected