MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaL_fileresult

Function luaL_fileresult

third-party/lua-5.2.4/src/lauxlib.c:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205
206
207LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
208 int en = errno; /* calls to Lua API may change this value */
209 if (stat) {
210 lua_pushboolean(L, 1);
211 return 1;
212 }
213 else {
214 lua_pushnil(L);
215 if (fname)
216 lua_pushfstring(L, "%s: %s", fname, strerror(en));
217 else
218 lua_pushstring(L, strerror(en));
219 lua_pushinteger(L, en);
220 return 3;
221 }
222}
223
224
225#if !defined(inspectstat) /* { */

Callers 13

luaL_execresultFunction · 0.70
os_removeFunction · 0.70
os_renameFunction · 0.70
io_fcloseFunction · 0.70
io_openFunction · 0.70
io_popenFunction · 0.70
io_tmpfileFunction · 0.70
g_readFunction · 0.70
g_writeFunction · 0.70
f_seekFunction · 0.70
f_setvbufFunction · 0.70
io_flushFunction · 0.70

Calls 5

lua_pushbooleanFunction · 0.70
lua_pushnilFunction · 0.70
lua_pushfstringFunction · 0.70
lua_pushstringFunction · 0.70
lua_pushintegerFunction · 0.70

Tested by

no test coverage detected