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

Function luaL_fileresult

extlibs/lua/src/lauxlib.c:245–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244
245LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
246 int en = errno; /* calls to Lua API may change this value */
247 if (stat) {
248 lua_pushboolean(L, 1);
249 return 1;
250 }
251 else {
252 luaL_pushfail(L);
253 if (fname)
254 lua_pushfstring(L, "%s: %s", fname, strerror(en));
255 else
256 lua_pushstring(L, strerror(en));
257 lua_pushinteger(L, en);
258 return 3;
259 }
260}
261
262
263#if !defined(l_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 4

lua_pushbooleanFunction · 0.85
lua_pushfstringFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected