MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / gmatch_aux

Function gmatch_aux

lib/lua/src/lstrlib.c:838–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836
837
838static 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
854static int gmatch (lua_State *L) {

Callers

nothing calls this directly

Calls 4

lua_touserdataFunction · 0.85
reprepstateFunction · 0.85
matchFunction · 0.85
push_capturesFunction · 0.85

Tested by

no test coverage detected