Document toke.c.
[p5sagit/p5-mst-13.2.git] / regexec.c
index 286131a..e69c4ff 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -39,6 +39,8 @@
 /* *These* symbols are masked to allow static link. */
 #  define Perl_pregexec my_pregexec
 #  define Perl_reginitcolors my_reginitcolors 
+
+#  define PERL_NO_GET_CONTEXT
 #endif 
 
 /*SUPPRESS 112*/
 #define PERL_IN_REGEXEC_C
 #include "perl.h"
 
+#ifdef PERL_IN_XSUB_RE
+#  if defined(PERL_CAPI) || defined(PERL_OBJECT)
+#    include "XSUB.h"
+#  endif
+#endif
+
 #include "regcomp.h"
 
 #define RF_tainted     1               /* tainted information used? */
@@ -313,6 +321,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
                 && (sv && (strpos + SvCUR(sv) != strend)) )
                goto fail;
 
+           PL_regeol = strend;                 /* Used in HOP() */
            s = (char*)HOP((U8*)strpos, prog->check_offset_min);
            if (SvTAIL(prog->check_substr)) {
                slen = SvCUR(prog->check_substr);       /* >= 1 */
@@ -350,6 +359,8 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
     }
 
   restart:
+    if (end_shift < 0)
+       end_shift = 0; /* can happen when strend == strpos */
     if (flags & REXEC_SCREAM) {
        SV *c = prog->check_substr;
        char *strbeg = SvPVX(sv);       /* XXXX Assume PV_force() on SCREAM! */