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