MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_execresult

Function luaL_execresult

src/Chain/libraries/glua/lauxlib.cpp:282–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281
282LUALIB_API int luaL_execresult(lua_State *L, int stat) {
283 const char *what = "exit"; /* type of termination */
284 if (stat == -1) /* error? */
285 return luaL_fileresult(L, 0, nullptr);
286 else {
287 l_inspectstat(stat, what); /* interpret result */
288 if (*what == 'e' && stat == 0) /* successful termination? */
289 lua_pushboolean(L, 1);
290 else
291 lua_pushnil(L);
292 lua_pushstring(L, what);
293 lua_pushinteger(L, stat);
294 return 3; /* return true/nil,what,code */
295 }
296}
297
298/* }====================================================== */
299

Callers 2

os_executeFunction · 0.85
io_pcloseFunction · 0.85

Calls 5

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

Tested by

no test coverage detected