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

Function getiofile

engine/lua/src/lua/liolib.c:194–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194static FILE *getiofile (lua_State *L, int findex) {
195 FILE *f;
196 lua_rawgeti(L, LUA_ENVIRONINDEX, findex);
197 f = *(FILE **)lua_touserdata(L, -1);
198 if (f == NULL)
199 luaL_error(L, "standard %s file is closed", fnames[findex - 1]);
200 return f;
201}
202
203
204static 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