diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-12-27 21:41:03 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-12-27 21:41:03 +0000 |
commit | a2794585f298613c6353549c1058857370acfed3 (patch) | |
tree | 36a4098b67749050428a201adc00c26229f7bc30 /regexec.c | |
parent | 03949bffb4c2f692878d9c34d8b1be5484d73c6d (diff) | |
download | perl-a2794585f298613c6353549c1058857370acfed3.tar.gz |
scalars used in postponed subexpressions aren't first class regexps,
so don't upgrade them to ORANGE before attaching qr magic.
(And don't stop using qr magic once regexps become first class)
p4raw-id: //depot/perl@32748
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3741,7 +3741,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) if (!(SvFLAGS(ret) & (SVs_TEMP | SVs_PADTMP | SVf_READONLY | SVs_GMG))) { - SvUPGRADE(ret, SVt_ORANGE); + /* This isn't a first class regexp. Instead, it's + caching a regexp onto an existing, Perl visible + scalar. */ sv_magic(ret,(SV*)ReREFCNT_inc(re), PERL_MAGIC_qr,0,0); } |