MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / opencheck

Function opencheck

extlibs/lua/src/liolib.c:249–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249static void opencheck (lua_State *L, const char *fname, const char *mode) {
250 LStream *p = newfile(L);
251 p->f = fopen(fname, mode);
252 if (p->f == NULL)
253 luaL_error(L, "cannot open file '%s' (%s)", fname, strerror(errno));
254}
255
256
257static int io_open (lua_State *L) {

Callers 2

g_iofileFunction · 0.85
io_linesFunction · 0.85

Calls 2

newfileFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected