From 82f5283e1479c12cbf74d1cf39f597f49b84e781 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Fri, 18 Nov 2011 17:16:14 +0000 Subject: 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'. --- op.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/op.c b/op.c index 2ebdaad257..5fe96c70e9 100644 --- a/op.c +++ b/op.c @@ -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; -- cgit v1.2.1