X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regexec.c;h=e69c4ffd4e617f382f34b32c271bab550064f4e7;hb=ffb4593ce8673bf9b750cef7f50a426a002fff80;hp=286131ac955d4ecb63291b78f816544ceff4d5a7;hpb=51371543ca1a75ed152020ad0846b5b8cf11c32f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regexec.c b/regexec.c index 286131a..e69c4ff 100644 --- 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*/ @@ -77,6 +79,12 @@ #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! */