diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-06-08 18:16:56 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-10 07:21:21 +0000 |
commit | e2d46a1de163ba101bb4392a8fa6d97ca3c9a323 (patch) | |
tree | 9dc1bbb410301b64987309b0fbfdd19c0687fc62 /pp_ctl.c | |
parent | 49136ef87c7a099210ef3e193f1a24f3def277ff (diff) | |
download | perl-e2d46a1de163ba101bb4392a8fa6d97ca3c9a323.tar.gz |
Applied patch, followed by tweaks to *.sym and `perl embed.pl`
Message-Id: <199806090216.WAA02041@monk.mps.ohio-state.edu>
Subject: [PATCH 5.004_66] Resend of RE cache patch (modified)
p4raw-id: //depot/perl@1105
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -76,8 +76,8 @@ PP(pp_regcomp) { MAGIC *mg = Null(MAGIC*); tmpstr = POPs; - if(SvROK(tmpstr)) { - SV *sv = SvRV(tmpstr); + if(SvROK(tmpstr) || SvRMAGICAL(tmpstr)) { + SV *sv = SvROK(tmpstr) ? SvRV(tmpstr) : tmpstr; if(SvMAGICAL(sv)) mg = mg_find(sv, 'r'); } @@ -101,6 +101,7 @@ PP(pp_regcomp) { pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */ pm->op_pmregexp = pregcomp(t, t + len, pm); + sv_magic(tmpstr,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0); } } |