| 602 | |
| 603 | |
| 604 | static void prepstate(MatchState *ms, lua_State *L, |
| 605 | const char *s, size_t ls, const char *p, size_t lp) { |
| 606 | ms->L = L; |
| 607 | ms->matchdepth = MAXCCALLS; |
| 608 | ms->src_init = s; |
| 609 | ms->src_end = s + ls; |
| 610 | ms->p_end = p + lp; |
| 611 | if (ls < (MAX_SIZET - B_REPS) / A_REPS) |
| 612 | ms->nrep = A_REPS * ls + B_REPS; |
| 613 | else /* overflow (very long subject) */ |
| 614 | ms->nrep = MAX_SIZET; /* no limit */ |
| 615 | } |
| 616 | |
| 617 | |
| 618 | static void reprepstate(MatchState *ms) { |
no outgoing calls
no test coverage detected