| 389 | |
| 390 | |
| 391 | static Capture *doublecap (lua_State *L, Capture *cap, int captop, int ptop) { |
| 392 | Capture *newc; |
| 393 | if (captop >= INT_MAX/((int)sizeof(Capture) * 2)) |
| 394 | luaL_error(L, "too many captures"); |
| 395 | newc = (Capture *)lua_newuserdata(L, captop * 2 * sizeof(Capture)); |
| 396 | memcpy(newc, cap, captop * sizeof(Capture)); |
| 397 | lua_replace(L, caplistidx(ptop)); |
| 398 | return newc; |
| 399 | } |
| 400 | |
| 401 | |
| 402 | static Stack *doublestack (lua_State *L, Stack **stacklimit, int ptop) { |
no test coverage detected