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

Function docall

src/Chain/libraries/glua/lua.cpp:196–207  ·  view source on GitHub ↗

** Interface to 'lua_pcall', which sets appropriate message function ** and C-signal handler. Used to run all chunks. */

Source from the content-addressed store, hash-verified

194** and C-signal handler. Used to run all chunks.
195*/
196static int docall(lua_State *L, int narg, int nres) {
197 int status;
198 int base = lua_gettop(L) - narg; /* function index */
199 lua_pushcfunction(L, msghandler); /* push message handler */
200 lua_insert(L, base); /* put it under function and args */
201 globalL = L; /* to be available to 'laction' */
202 signal(SIGINT, laction); /* set C-signal handler */
203 status = lua_pcall(L, narg, nres, base);
204 signal(SIGINT, SIG_DFL); /* reset C-signal handler */
205 lua_remove(L, base); /* remove message handler from the stack */
206 return status;
207}
208
209
210static void print_version(void) {

Callers 4

dochunkFunction · 0.70
dolibraryFunction · 0.70
doREPLFunction · 0.70
handle_scriptFunction · 0.70

Calls 2

lua_gettopFunction · 0.85
signalClass · 0.50

Tested by

no test coverage detected