MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / opencheck

Function opencheck

third-party/lua-5.4.6/src/liolib.c:261–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259
260
261static 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
269static int io_open (lua_State *L) {

Callers 2

g_iofileFunction · 0.70
io_linesFunction · 0.70

Calls 2

newfileFunction · 0.70
luaL_errorFunction · 0.70

Tested by

no test coverage detected