MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / docall

Function docall

third-party/lua-5.5.0/src/lua.c:155–166  ·  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

153** and C-signal handler. Used to run all chunks.
154*/
155static int docall (lua_State *L, int narg, int nres) {
156 int status;
157 int base = lua_gettop(L) - narg; /* function index */
158 lua_pushcfunction(L, msghandler); /* push message handler */
159 lua_insert(L, base); /* put it under function and args */
160 globalL = L; /* to be available to 'laction' */
161 setsignal(SIGINT, laction); /* set C-signal handler */
162 status = lua_pcall(L, narg, nres, base);
163 setsignal(SIGINT, SIG_DFL); /* reset C-signal handler */
164 lua_remove(L, base); /* remove message handler from the stack */
165 return status;
166}
167
168
169static void print_version (void) {

Callers 4

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

Calls 5

lua_gettopFunction · 0.70
setsignalFunction · 0.70
lua_insertFunction · 0.50
lua_pcallFunction · 0.50
lua_removeFunction · 0.50

Tested by

no test coverage detected