MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getiofile

Function getiofile

deps/lua/src/liolib.c:190–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190static FILE *getiofile (lua_State *L, int findex) {
191 FILE *f;
192 lua_rawgeti(L, LUA_ENVIRONINDEX, findex);
193 f = *(FILE **)lua_touserdata(L, -1);
194 if (f == NULL)
195 luaL_error(L, "standard %s file is closed", fnames[findex - 1]);
196 return f;
197}
198
199
200static int g_iofile (lua_State *L, int f, const char *mode) {

Callers 3

io_readFunction · 0.85
io_writeFunction · 0.85
io_flushFunction · 0.85

Calls 3

lua_rawgetiFunction · 0.85
lua_touserdataFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected