MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaL_execresult

Function luaL_execresult

3rd/lua-5.4.3/src/lauxlib.c:285–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

os_executeFunction · 0.85
io_pcloseFunction · 0.85

Calls 4

luaL_fileresultFunction · 0.85
lua_pushbooleanFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected