In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/40b6423cb7af5e5b76038bef524e04a65967825a?hp=095b19d150eee57ee8501177d6950002977ef74c>
- Log ----------------------------------------------------------------- commit 40b6423cb7af5e5b76038bef524e04a65967825a Author: David Mitchell <[email protected]> Date: Tue Jul 31 14:30:47 2012 +0100 make re_compile core-engine specific Originally, Perl_re_compile() was the entry point for perl's regex compiler. After commit 3c13cae629d936c43bca9d992cc445d93287af8e, this function inadvertently became a wrapper meaning "execute the comp method of the current engine". Change it back so that it always invokes only perl's engine. This fixes [perl #114302] Bleadperl v5.17.0-408-g3c13cae breaks DGL/re-engine-RE2-0.10.tar.gz ----------------------------------------------------------------------- Summary of changes: regcomp.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/regcomp.c b/regcomp.c index 8a75492..2bda5da 100644 --- a/regcomp.c +++ b/regcomp.c @@ -81,6 +81,7 @@ #define REG_COMP_C #ifdef PERL_IN_XSUB_RE # include "re_comp.h" +extern const struct regexp_engine my_reg_engine; #else # include "regcomp.h" #endif @@ -4961,16 +4962,23 @@ Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags) } #endif -/* public(ish) wrapper for Perl_re_op_compile that only takes an SV - * pattern rather than a list of OPs */ +/* public(ish) entry point for the perl core's own regex compiling code. + * It's actually a wrapper for Perl_re_op_compile that only takes an SV + * pattern rather than a list of OPs, and uses the internal engine rather + * than the current one */ REGEXP * Perl_re_compile(pTHX_ SV * const pattern, U32 rx_flags) { SV *pat = pattern; /* defeat constness! */ PERL_ARGS_ASSERT_RE_COMPILE; - return Perl_re_op_compile(aTHX_ &pat, 1, NULL, current_re_engine(), - NULL, NULL, rx_flags, 0); + return Perl_re_op_compile(aTHX_ &pat, 1, NULL, +#ifdef PERL_IN_XSUB_RE + &my_reg_engine, +#else + &PL_core_reg_engine, +#endif + NULL, NULL, rx_flags, 0); } /* see if there are any run-time code blocks in the pattern. -- Perl5 Master Repository
