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