Benchmark notes (from Barrie Slaymaker <barries@slaysys.com>)
[p5sagit/p5-mst-13.2.git] / regexec.c
index 6981424..65a3b90 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -742,7 +742,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
     if (prog->reganch & ROPT_GPOS_SEEN) { /* Need to have PL_reg_ganch */
        MAGIC *mg;
 
-       if (flags & REXEC_IGNOREPOS)
+       if (flags & REXEC_IGNOREPOS)    /* Means: check only at start */
            PL_reg_ganch = startpos;
        else if (sv && SvTYPE(sv) >= SVt_PVMG
                  && SvMAGIC(sv)
@@ -754,7 +754,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
                s = PL_reg_ganch;
            }
        }
-       else
+       else                            /* pos() not defined */
            PL_reg_ganch = strbeg;
     }
 
@@ -1509,7 +1509,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
            }
            PL_reg_magic    = mg;
            PL_reg_oldpos   = mg->mg_len;
-           SAVEDESTRUCTOR(restore_pos, 0);
+           SAVEDESTRUCTOR_X(restore_pos, 0);
         }
        if (!PL_reg_curpm)
            New(22,PL_reg_curpm, 1, PMOP);
@@ -3051,7 +3051,7 @@ S_regmatch(pTHX_ regnode *prog)
                next = NULL;
            break;
        default:
-           PerlIO_printf(PerlIO_stderr(), "%lx %d\n",
+           PerlIO_printf(Perl_error_log, "%lx %d\n",
                          (unsigned long)scan, OP(scan));
            Perl_croak(aTHX_ "regexp memory corruption");
        }