** free all CallInfo structures not in use by a thread */
| 172 | ** free all CallInfo structures not in use by a thread |
| 173 | */ |
| 174 | void luaE_freeCI (lua_State *L) { |
| 175 | CallInfo *ci = L->ci; |
| 176 | CallInfo *next = ci->next; |
| 177 | ci->next = NULL; |
| 178 | L->nCcalls += L->nci; /* add removed elements back to 'nCcalls' */ |
| 179 | while ((ci = next) != NULL) { |
| 180 | next = ci->next; |
| 181 | luaM_free(L, ci); |
| 182 | L->nci--; |
| 183 | } |
| 184 | L->nCcalls -= L->nci; /* adjust result */ |
| 185 | } |
| 186 | |
| 187 | |
| 188 | /* |
no outgoing calls
no test coverage detected