summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-12-07 11:29:27 +0000
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:46 +0100
commit2a92a97368adae0667f9a98890bb48727ed74e54 (patch)
tree7574572be9929ef6633dad50b46aa91c89d7d1ea /regcomp.c
parent6f635923850b5cd9fcb7399e6455299f0371c5ff (diff)
downloadperl-2a92a97368adae0667f9a98890bb48727ed74e54.tar.gz
add PMf_IS_QR flag
This indicates that a particular PMOP is in fact OP_QR. We should of course be able to tell this from op_type, but the regex-compiling API only gets passed op_flags. This then allows us to fix a bug where we were deciding during compilation whether to hang on to the code_blocks based on whether the PMOP was PMf_HAS_CV rather than PMf_IS_QR; the latter implies the former, but not the other way round.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index b1a1ee98b3..17e586280e 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5550,7 +5550,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
RXi_SET( r, ri );
r->engine= RE_ENGINE_PTR;
r->extflags = pm_flags;
- if (orig_pm_flags & PMf_HAS_CV) {
+ if (orig_pm_flags & PMf_IS_QR) {
ri->code_blocks = pRExC_state->code_blocks;
ri->num_code_blocks = pRExC_state->num_code_blocks;
}