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

Function start_capture

lib/lua/src/lstrlib.c:534–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532
533
534static const char *start_capture (MatchState *ms, const char *s,
535 const char *p, int what) {
536 const char *res;
537 int level = ms->level;
538 if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
539 ms->capture[level].init = s;
540 ms->capture[level].len = what;
541 ms->level = level+1;
542 if ((res=match(ms, s, p)) == NULL) /* match failed? */
543 ms->level--; /* undo capture */
544 return res;
545}
546
547
548static const char *end_capture (MatchState *ms, const char *s,

Callers 1

matchFunction · 0.85

Calls 2

luaL_errorFunction · 0.85
matchFunction · 0.85

Tested by

no test coverage detected