| 833 | |
| 834 | |
| 835 | static int gmatch_aux (lua_State *L) { |
| 836 | GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3)); |
| 837 | const char *src; |
| 838 | gm->ms.L = L; |
| 839 | for (src = gm->src; src <= gm->ms.src_end; src++) { |
| 840 | const char *e; |
| 841 | reprepstate(&gm->ms); |
| 842 | if ((e = match(&gm->ms, src, gm->p)) != NULL && e != gm->lastmatch) { |
| 843 | gm->src = gm->lastmatch = e; |
| 844 | return push_captures(&gm->ms, src, e); |
| 845 | } |
| 846 | } |
| 847 | return 0; /* not found */ |
| 848 | } |
| 849 | |
| 850 | |
| 851 | static int gmatch (lua_State *L) { |
nothing calls this directly
no test coverage detected