MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / docall

Function docall

3rd/lua-5.4.3/src/lua.c:152–163  ·  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

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

Callers 4

dochunkFunction · 0.85
dolibraryFunction · 0.85
handle_scriptFunction · 0.85
doREPLFunction · 0.85

Calls 2

lua_gettopFunction · 0.85
setsignalFunction · 0.85

Tested by

no test coverage detected