summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2007-03-21 11:39:24 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-22 09:01:37 +0000
commit28d8d7f41ab202dd5f7611033d27ecad44cadd60 (patch)
tree330e1fcd2c3e0573355f25c14fc04ce0e64c608c /pp_ctl.c
parentda140a4068f95cc339e9327c1579a94f9f241dd8 (diff)
downloadperl-28d8d7f41ab202dd5f7611033d27ecad44cadd60.tar.gz
Resolve PL_curpm issues with (??{}) and fix corruption of match results when pattern is a qr.
Message-ID: <9b18b3110703210239x540f5ad9mdb41c2ea6229ac31@mail.gmail.com> plus two follow-up patches (minor tweaks) p4raw-id: //depot/perl@30678
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 25cfe5fc91..124a40fa08 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -118,9 +118,9 @@ PP(pp_regcomp)
mg = mg_find(sv, PERL_MAGIC_qr);
}
if (mg) {
- regexp * const re = (regexp *)mg->mg_obj;
+ regexp * const re = reg_temp_copy((regexp *)mg->mg_obj);
ReREFCNT_dec(PM_GETRE(pm));
- PM_SETRE(pm, ReREFCNT_inc(re));
+ PM_SETRE(pm, re);
}
else {
STRLEN len;