MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / adddyncaptures

Function adddyncaptures

other_src/lua/src/lpeg.cpp:422–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420
421
422static void adddyncaptures (const char *s, Capture *base, int n, int fd) {
423 int i;
424 assert(base[0].kind == Cruntime && base[0].siz == 0);
425 base[0].idx = fd; /* first returned capture */
426 for (i = 1; i < n; i++) { /* add extra captures */
427 base[i].siz = 1; /* mark it as closed */
428 base[i].s = s;
429 base[i].kind = Cruntime;
430 base[i].idx = fd + i; /* stack index */
431 }
432 base[n].kind = Cclose; /* add closing entry */
433 base[n].siz = 1;
434 base[n].s = s;
435}
436
437
438#define condfailed(p) { int f = p->i.offset; if (f) p+=f; else goto fail; }

Callers 1

matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected