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