| 170 | |
| 171 | |
| 172 | static int docall (lua_State *L, int narg, int nres) { |
| 173 | int status; |
| 174 | int base = lua_gettop(L) - narg; /* function index */ |
| 175 | lua_pushcfunction(L, traceback); /* push traceback function */ |
| 176 | lua_insert(L, base); /* put it under chunk and args */ |
| 177 | globalL = L; /* to be available to 'laction' */ |
| 178 | signal(SIGINT, laction); |
| 179 | status = lua_pcall(L, narg, nres, base); |
| 180 | signal(SIGINT, SIG_DFL); |
| 181 | lua_remove(L, base); /* remove traceback function */ |
| 182 | return status; |
| 183 | } |
| 184 | |
| 185 | |
| 186 | static void print_version (void) { |
no test coverage detected