MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_fileresult

Function luaL_fileresult

src/Chain/libraries/glua/lauxlib.cpp:242–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242LUALIB_API int luaL_fileresult(lua_State *L, int stat, const char *fname) {
243 int en = errno; /* calls to Lua API may change this value */
244 if (stat) {
245 lua_pushboolean(L, 1);
246 return 1;
247 }
248 else {
249 lua_pushnil(L);
250 if (fname)
251 lua_pushfstring(L, "%s: %s", fname, strerror(en));
252 else
253 lua_pushstring(L, strerror(en));
254 lua_pushinteger(L, en);
255 return 3;
256 }
257}
258
259
260#if !defined(l_inspectstat) /* { */

Callers 13

os_removeFunction · 0.85
os_renameFunction · 0.85
io_fcloseFunction · 0.85
io_openFunction · 0.85
io_popenFunction · 0.85
io_tmpfileFunction · 0.85
g_readFunction · 0.85
g_writeFunction · 0.85
f_seekFunction · 0.85
f_setvbufFunction · 0.85
io_flushFunction · 0.85
f_flushFunction · 0.85

Calls 5

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

Tested by

no test coverage detected