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