2 #ifndef PERL_REGINLINE_H
5 - regnext - dig the "next" pointer out of a node
9 Perl_regnext(pTHX_ const regnode *p)
16 if (OP(p) > REGNODE_MAX) { /* regnode.type is unsigned */
17 Perl_croak(aTHX_ "Corrupted regexp opcode %d > %d",
18 (int)OP(p), (int)REGNODE_MAX);
21 offset = (REGNODE_OFF_BY_ARG(OP(p)) ? ARG(p) : NEXT_OFF(p));
25 return(regnode *)(p+offset);
29 - regnode_after - find the node physically following p in memory,
30 taking into account the size of p as determined by OP(p), our
31 sizing data, and possibly the STR_SZ() macro.
35 Perl_regnode_after(pTHX_ const regnode *p, const bool varies)
39 assert(op < REGNODE_MAX);
40 const regnode *ret = p + NODE_STEP_REGNODE + REGNODE_ARG_LEN(op);
41 if (varies || REGNODE_ARG_LEN_VARIES(op))
42 ret += STR_SZ(STR_LEN(p));
43 return (regnode *)ret;
46 /* validate that the passed in node and extra length would match that
47 * returned by regnode_after() */
50 Perl_check_regnode_after(pTHX_ const regnode *p, const STRLEN extra)
52 const regnode *nextoper = regnode_after((regnode *)p,FALSE);
53 const regnode *other = REGNODE_AFTER_PLUS(p, extra);
54 if (nextoper != other) {
60 #define PERL_REGINLINE_H
63 * ex: set ts=8 sts=4 sw=4 et: