summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-06-09 19:09:55 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-10 07:40:30 +0000
commit20e9db593ef4f0b3ec4e4dbedd03ab5782525eaf (patch)
treedcfbc77fe708f01ff80cbc31748ca5d4c9d4f9df /pp.c
parenta77df738193280ffa098f7f89c9640b77c4b9d4c (diff)
downloadperl-20e9db593ef4f0b3ec4e4dbedd03ab5782525eaf.tar.gz
Re: PATCH for study/foo/
Message-Id: <199806100309.XAA04974@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1111
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index aeaca4c607..c65ed1c8c9 100644
--- a/pp.c
+++ b/pp.c
@@ -604,8 +604,11 @@ PP(pp_study)
if(unop->op_first && unop->op_first->op_type == OP_PUSHRE) {
PMOP *pm = (PMOP *)unop->op_first;
SV *rv = sv_newmortal();
+ REGEXP *re = pm->op_pmregexp;
+
sv = newSVrv(rv, "Regexp");
- sv_magic(sv,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0);
+ sv_setpvn(sv,re->precomp,re->prelen);
+ sv_magic(sv,(SV*)ReREFCNT_inc(re),'r',0,0);
RETURNX(PUSHs(rv));
}