| 188 | |
| 189 | |
| 190 | static FILE *getiofile (lua_State *L, int findex) { |
| 191 | FILE *f; |
| 192 | lua_rawgeti(L, LUA_ENVIRONINDEX, findex); |
| 193 | f = *(FILE **)lua_touserdata(L, -1); |
| 194 | if (f == NULL) |
| 195 | luaL_error(L, "standard %s file is closed", fnames[findex - 1]); |
| 196 | return f; |
| 197 | } |
| 198 | |
| 199 | |
| 200 | static int g_iofile (lua_State *L, int f, const char *mode) { |
no test coverage detected