summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-08 17:10:29 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-08 17:10:29 +0000
commit10599a699e18a26ba9c9154ce2c01e7cf53249ce (patch)
tree10bede87c74177d62b57585acf5c760f0469be98 /perl.c
parent9a8b670905dec428f75660a49918537c7271b6b6 (diff)
downloadperl-10599a699e18a26ba9c9154ce2c01e7cf53249ce.tar.gz
In PL_regexp_padav, store regexps via real references, rather than
hiding them within IVs. We can do this now that they are real SV pointers. p4raw-id: //depot/perl@32900
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/perl.c b/perl.c
index 72735c274d..e57356bcd1 100644
--- a/perl.c
+++ b/perl.c
@@ -884,13 +884,11 @@ perl_destruct(pTHXx)
* flag is set in regexec.c:S_regtry
*/
SvFLAGS(resv) &= ~SVf_BREAK;
+ /* So stop it pointing to what is now a dead reference. */
+ SvROK_off(resv);
}
else if(SvREPADTMP(resv)) {
SvREPADTMP_off(resv);
- }
- else if(SvIOKp(resv)) {
- REGEXP *re = INT2PTR(REGEXP *,SvIVX(resv));
- ReREFCNT_dec(re);
}
}
}