| 216 | |
| 217 | |
| 218 | static void opencheck (lua_State *L, const char *fname, const char *mode) { |
| 219 | LStream *p = newfile(L); |
| 220 | p->f = fopen(fname, mode); |
| 221 | if (p->f == NULL) |
| 222 | luaL_error(L, "cannot open file " LUA_QS " (%s)", fname, strerror(errno)); |
| 223 | } |
| 224 | |
| 225 | |
| 226 | static int io_open (lua_State *L) { |
no test coverage detected