MCPcopy Create free account
hub / github.com/DFHack/dfhack / getiofile

Function getiofile

depends/lua/src/liolib.c:295–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293
294
295static FILE *getiofile (lua_State *L, const char *findex) {
296 LStream *p;
297 lua_getfield(L, LUA_REGISTRYINDEX, findex);
298 p = (LStream *)lua_touserdata(L, -1);
299 if (isclosed(p))
300 luaL_error(L, "standard %s file is closed", findex + IOPREF_LEN);
301 return p->f;
302}
303
304
305static 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