| 12102 | |
| 12103 | |
| 12104 | static FILE *getiofile (lua_State *L, int findex) { |
| 12105 | FILE *f; |
| 12106 | lua_rawgeti(L, LUA_ENVIRONINDEX, findex); |
| 12107 | f = *(FILE **)lua_touserdata(L, -1); |
| 12108 | if (f == NULL) |
| 12109 | luaL_error(L, "standard %s file is closed", fnames[findex - 1]); |
| 12110 | return f; |
| 12111 | } |
| 12112 | |
| 12113 | |
| 12114 | static int g_iofile (lua_State *L, int f, const char *mode) { |
no test coverage detected