MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaL_execresult

Function luaL_execresult

lib/lua/src/lauxlib.c:288–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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