From 0001e23a054ec2f55dba9c4a5871acd9026fa4cc Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sat, 4 Jul 1998 01:51:47 +0000 Subject: merge changes#1210,1211,1270 from maintbranch p4raw-link: @1270 on //depot/maint-5.004/perl: 413603941653f55130af336b8e990052b26673a6 p4raw-link: @1211 on //depot/maint-5.004/perl: 247620c138019426962998dd7edc0157874220f0 p4raw-link: @1210 on //depot/maint-5.004/perl: 4522f71f5c16bf8892b1952004accec53aab868e p4raw-id: //depot/perl@1277 --- pp_ctl.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'pp_ctl.c') diff --git a/pp_ctl.c b/pp_ctl.c index f1c0669584..f121b7e453 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -67,7 +67,8 @@ PP(pp_regcmaybe) return NORMAL; } -PP(pp_regcomp) { +PP(pp_regcomp) +{ djSP; register PMOP *pm = (PMOP*)cLOGOP->op_other; register char *t; @@ -76,12 +77,12 @@ PP(pp_regcomp) { MAGIC *mg = Null(MAGIC*); tmpstr = POPs; - if(SvROK(tmpstr)) { + if (SvROK(tmpstr)) { SV *sv = SvRV(tmpstr); if(SvMAGICAL(sv)) mg = mg_find(sv, 'r'); } - if(mg) { + if (mg) { regexp *re = (regexp *)mg->mg_obj; ReREFCNT_dec(pm->op_pmregexp); pm->op_pmregexp = ReREFCNT_inc(re); @@ -89,6 +90,15 @@ PP(pp_regcomp) { else { t = SvPV(tmpstr, len); +#ifndef INCOMPLETE_TAINTS + if (tainting) { + if (tainted) + pm->op_pmdynflags |= PMdf_TAINTED; + else + pm->op_pmdynflags &= ~PMdf_TAINTED; + } +#endif + /* Check against the last compiled regexp. */ if (!pm->op_pmregexp || !pm->op_pmregexp->precomp || pm->op_pmregexp->prelen != len || -- cgit v1.2.1