MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / docall

Function docall

lua/lua.c:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92
93
94static int docall (lua_State *L, int narg, int clear) {
95 int status;
96 int base = lua_gettop(L) - narg; /* function index */
97 lua_pushcfunction(L, traceback); /* push traceback function */
98 lua_insert(L, base); /* put it under chunk and args */
99 signal(SIGINT, laction);
100 status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base);
101 signal(SIGINT, SIG_DFL);
102 lua_remove(L, base); /* remove traceback function */
103 /* force a complete garbage collection in case of errors */
104 if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0);
105 return status;
106}
107
108
109static void print_version (void) {

Callers 5

dofileFunction · 0.85
dostringFunction · 0.85
dolibraryFunction · 0.85
dottyFunction · 0.85
handle_scriptFunction · 0.85

Calls 5

lua_gettopFunction · 0.85
lua_insertFunction · 0.85
lua_pcallFunction · 0.85
lua_removeFunction · 0.85
lua_gcFunction · 0.85

Tested by

no test coverage detected