** check whether thread has a suspended protected call */
| 524 | ** check whether thread has a suspended protected call |
| 525 | */ |
| 526 | static CallInfo *findpcall (lua_State *L) { |
| 527 | CallInfo *ci; |
| 528 | for (ci = L->ci; ci != NULL; ci = ci->previous) { /* search for a pcall */ |
| 529 | if (ci->callstatus & CIST_YPCALL) |
| 530 | return ci; |
| 531 | } |
| 532 | return NULL; /* no pending pcall */ |
| 533 | } |
| 534 | |
| 535 | |
| 536 | static int recover (lua_State *L, int status) { |