| 259 | |
| 260 | |
| 261 | static void opencheck (lua_State *L, const char *fname, const char *mode) { |
| 262 | LStream *p = newfile(L); |
| 263 | p->f = fopen(fname, mode); |
| 264 | if (l_unlikely(p->f == NULL)) |
| 265 | luaL_error(L, "cannot open file '%s' (%s)", fname, strerror(errno)); |
| 266 | } |
| 267 | |
| 268 | |
| 269 | static int io_open (lua_State *L) { |
no test coverage detected