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

Function getiofile

extlibs/lua/src/liolib.c:294–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293
294static FILE *getiofile (lua_State *L, const char *findex) {
295 LStream *p;
296 lua_getfield(L, LUA_REGISTRYINDEX, findex);
297 p = (LStream *)lua_touserdata(L, -1);
298 if (isclosed(p))
299 luaL_error(L, "default %s file is closed", findex + IOPREF_LEN);
300 return p->f;
301}
302
303
304static int g_iofile (lua_State *L, const char *f, const char *mode) {

Callers 3

io_readFunction · 0.85
io_writeFunction · 0.85
io_flushFunction · 0.85

Calls 3

lua_getfieldFunction · 0.85
lua_touserdataFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected