diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-04 01:51:47 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-04 01:51:47 +0000 |
commit | b3eb6a9ba72c92b7decf330d8d63b32ba5499629 (patch) | |
tree | b3af31372ba9c68faf41895b58e0baa1f9372d16 /pp_ctl.c | |
parent | 85b81015bdcfa6e7a9ccddddb0d3face7465f666 (diff) | |
download | perl-b3eb6a9ba72c92b7decf330d8d63b32ba5499629.tar.gz |
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
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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 || |