From: Ilya Zakharevich Date: Tue, 9 Jun 1998 23:09:55 +0000 (-0400) Subject: Re: PATCH for study/foo/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20e9db593ef4f0b3ec4e4dbedd03ab5782525eaf;p=p5sagit%2Fp5-mst-13.2.git Re: PATCH for study/foo/ Message-Id: <199806100309.XAA04974@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1111 --- diff --git a/pp.c b/pp.c index aeaca4c..c65ed1c 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)); }