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

Function luaL_execresult

third-party/lua-5.5.0/src/lauxlib.c:291–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290
291LUALIB_API int luaL_execresult (lua_State *L, int stat) {
292 if (stat != 0 && errno != 0) /* error with an 'errno'? */
293 return luaL_fileresult(L, 0, NULL);
294 else {
295 const char *what = "exit"; /* type of termination */
296 l_inspectstat(stat, what); /* interpret result */
297 if (*what == 'e' && stat == 0) /* successful termination? */
298 lua_pushboolean(L, 1);
299 else
300 luaL_pushfail(L);
301 lua_pushstring(L, what);
302 lua_pushinteger(L, stat);
303 return 3; /* return true/fail,what,code */
304 }
305}
306
307/* }====================================================== */
308

Callers 2

os_executeFunction · 0.70
io_pcloseFunction · 0.70

Calls 4

luaL_fileresultFunction · 0.70
lua_pushbooleanFunction · 0.70
lua_pushstringFunction · 0.70
lua_pushintegerFunction · 0.70

Tested by

no test coverage detected