| 292 | |
| 293 | |
| 294 | static FILE *getiofile (lua_State *L, const char *findex) { |
| 295 | LStream *p; |
| 296 | lua_getfield(L, LUA_REGISTRYINDEX, findex); |
| 297 | p = (LStream *)lua_touserdata(L, -1); |
| 298 | if (isclosed(p)) |
| 299 | luaL_error(L, "default %s file is closed", findex + IOPREF_LEN); |
| 300 | return p->f; |
| 301 | } |
| 302 | |
| 303 | |
| 304 | static int g_iofile (lua_State *L, const char *f, const char *mode) { |
no test coverage detected