Add tests for all the other types that %^H serialisation is supposed
[p5sagit/p5-mst-13.2.git] / regcomp.c
index fe32ce2..8815003 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4666,8 +4666,10 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
            ANYOF_FLAGS(ret) |= ANYOF_INVERT;
     }
 
-    if (SIZE_ONLY)
+    if (SIZE_ONLY) {
        RExC_size += ANYOF_SKIP;
+       listsv = &PL_sv_undef; /* For code scanners: listsv always non-NULL. */
+    }
     else {
        RExC_emit += ANYOF_SKIP;
        if (FOLD)
@@ -6228,13 +6230,13 @@ S_put_byte(pTHX_ SV *sv, int c)
 }
 
 
-STATIC regnode *
-S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
-    SV* sv, I32 l)
+STATIC const regnode *
+S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node,
+           const regnode *last, SV* sv, I32 l)
 {
     dVAR;
     register U8 op = EXACT;    /* Arbitrary non-END op. */
-    register regnode *next;
+    register const regnode *next;
 
     while (op != END && (!last || node < last)) {
        /* While that wasn't END last time... */
@@ -6243,7 +6245,7 @@ S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
        op = OP(node);
        if (op == CLOSE)
            l--;        
-       next = regnext(node);
+       next = regnext((regnode *)node);
        /* Where, what. */
        if (OP(node) == OPTIMIZED)
            goto after_print;
@@ -6257,9 +6259,9 @@ S_dumpuntil(pTHX_ const regexp *r, regnode *start, regnode *node, regnode *last,
        (void)PerlIO_putc(Perl_debug_log, '\n');
       after_print:
        if (PL_regkind[(U8)op] == BRANCHJ) {
-           register regnode *nnode = (OP(next) == LONGJMP
-                                      ? regnext(next)
-                                      : next);
+           register const regnode *nnode = (OP(next) == LONGJMP
+                                            ? regnext((regnode *)next)
+                                            : next);
            if (last && nnode > last)
                nnode = last;
            node = dumpuntil(r, start, NEXTOPER(NEXTOPER(node)), nnode, sv, l + 1);