MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / opencheck

Function opencheck

3rd/lua-5.4.3/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.85
io_linesFunction · 0.85

Calls 2

newfileFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected