diff options
author | David Mitchell <davem@iabyn.com> | 2011-11-18 17:16:14 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-12-19 15:06:05 +0000 |
commit | 82f5283e1479c12cbf74d1cf39f597f49b84e781 (patch) | |
tree | e27821b40129b18d67654954655ad66d742068b5 | |
parent | fd358c89eeb5e0d67efc195e9867f76558a0ad95 (diff) | |
download | perl-82f5283e1479c12cbf74d1cf39f597f49b84e781.tar.gz |
pm_runtime(): tidy some local vars
inline and delete the 'ext_eng' variable, as it's only used once;
and reduce the scope of 'eng'.
-rw-r--r-- | op.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -4206,8 +4206,6 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor) bool is_trans = (o->op_type == OP_TRANS || o->op_type == OP_TRANSR); bool is_compiletime; bool has_code; - bool ext_eng; - regexp_engine *eng; PERL_ARGS_ASSERT_PMRUNTIME; @@ -4263,11 +4261,6 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor) LINKLIST(expr); - /* are we using an external (non-perl) re engine? */ - - eng = current_re_engine(); - ext_eng = (eng && eng != &PL_core_reg_engine); - /* fix up DO blocks; treat each one as a separate little sub */ if (expr->op_type == OP_LIST) { @@ -4313,11 +4306,12 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg, I32 floor) if (is_compiletime) { U32 pm_flags = pm->op_pmflags & (RXf_PMf_COMPILETIME|PMf_HAS_CV); + regexp_engine *eng = current_re_engine(); if (o->op_flags & OPf_SPECIAL) pm_flags |= RXf_SPLIT; - if (!has_code || ext_eng) { + if (!has_code || (eng && eng != &PL_core_reg_engine)) { /* compile-time simple constant pattern */ SV *pat; |