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