| 306 | |
| 307 | |
| 308 | static FILE *getiofile (lua_State *L, const char *findex) { |
| 309 | LStream *p; |
| 310 | lua_getfield(L, LUA_REGISTRYINDEX, findex); |
| 311 | p = (LStream *)lua_touserdata(L, -1); |
| 312 | if (l_unlikely(isclosed(p))) |
| 313 | luaL_error(L, "default %s file is closed", findex + IOPREF_LEN); |
| 314 | return p->f; |
| 315 | } |
| 316 | |
| 317 | |
| 318 | static int g_iofile (lua_State *L, const char *f, const char *mode) { |
no test coverage detected