MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaL_execresult

Function luaL_execresult

extlibs/lua/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 const char *what = "exit"; /* type of termination */
287 if (stat == -1) /* error? */
288 return luaL_fileresult(L, 0, NULL);
289 else {
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.70
io_pcloseFunction · 0.70

Calls 4

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

Tested by

no test coverage detected