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

Function getiofile

3rd/lua-5.4.3/src/liolib.c:308–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306
307
308static FILE *getiofile (lua_State *L, const char *findex) {
309 LStream *p;
310 lua_getfield(L, LUA_REGISTRYINDEX, findex);
311 p = (LStream *)lua_touserdata(L, -1);
312 if (l_unlikely(isclosed(p)))
313 luaL_error(L, "default %s file is closed", findex + IOPREF_LEN);
314 return p->f;
315}
316
317
318static 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