** If function yielded, its 'func' can be in the 'extra' field. The ** next function restores 'func' to its correct value for debugging ** purposes. (It exchanges 'func' and 'extra'; so, when called again, ** after debugging, it also "re-restores" ** 'func' to its altered value. */
| 60 | ** after debugging, it also "re-restores" ** 'func' to its altered value. |
| 61 | */ |
| 62 | static void swapextra (lua_State *L) { |
| 63 | if (L->status == LUA_YIELD) { |
| 64 | CallInfo *ci = L->ci; /* get function that yielded */ |
| 65 | StkId temp = ci->func; /* exchange its 'func' and 'extra' values */ |
| 66 | ci->func = restorestack(L, ci->extra); |
| 67 | ci->extra = savestack(L, temp); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | |
| 72 | /* |
no outgoing calls
no test coverage detected