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

Function opencheck

third-party/lua-5.2.4/src/liolib.c:218–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217
218static 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
226static 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