MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / pushresult

Function pushresult

Source/Misc/lua/src/lua.c:11944–11959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11942
11943
11944static int pushresult (lua_State *L, int i, const char *filename) {
11945int en = errno; /* calls to Lua API may change this value */
11946if (i) {
11947lua_pushboolean(L, 1);
11948return 1;
11949}
11950else {
11951lua_pushnil(L);
11952if (filename)
11953lua_pushfstring(L, "%s: %s", filename, strerror(en));
11954else
11955lua_pushfstring(L, "%s", strerror(en));
11956lua_pushinteger(L, en);
11957return 3;
11958}
11959}
11960
11961
11962static void fileerror (lua_State *L, int arg, const char *filename) {

Callers 11

io_pcloseFunction · 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 4

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

Tested by

no test coverage detected