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

Function io_type

extlibs/lua/src/liolib.c:151–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151static int io_type (lua_State *L) {
152 LStream *p;
153 luaL_checkany(L, 1);
154 p = (LStream *)luaL_testudata(L, 1, LUA_FILEHANDLE);
155 if (p == NULL)
156 luaL_pushfail(L); /* not a file */
157 else if (isclosed(p))
158 lua_pushliteral(L, "closed file");
159 else
160 lua_pushliteral(L, "file");
161 return 1;
162}
163
164
165static int f_tostring (lua_State *L) {

Callers

nothing calls this directly

Calls 2

luaL_checkanyFunction · 0.85
luaL_testudataFunction · 0.70

Tested by

no test coverage detected