diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-09 20:34:11 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-09 20:34:11 +0000 |
commit | eeb3addf3feec5ffbcc249451fd5751440056e0d (patch) | |
tree | f768dac0b163ce44ec17e0d6bb12b2aa8f8c72dd /pp_ctl.c | |
parent | 4a4a611618e8ff6d5ad41c0e944ec39ce1bd0e52 (diff) | |
parent | c024d977a3f66deece6fa8197092e1716641d48e (diff) | |
download | perl-eeb3addf3feec5ffbcc249451fd5751440056e0d.tar.gz |
Integrate mainline.
p4raw-id: //depot/perlio@7630
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -211,6 +211,21 @@ PP(pp_substcont) cx->sb_m = m = rx->startp[0] + orig; sv_catpvn(dstr, s, m-s); cx->sb_s = rx->endp[0] + orig; + { /* Update the pos() information. */ + SV *sv = cx->sb_targ; + MAGIC *mg; + I32 i; + if (SvTYPE(sv) < SVt_PVMG) + SvUPGRADE(sv, SVt_PVMG); + if (!(mg = mg_find(sv, 'g'))) { + sv_magic(sv, Nullsv, 'g', Nullch, 0); + mg = mg_find(sv, 'g'); + } + i = m - orig; + if (DO_UTF8(sv)) + sv_pos_b2u(sv, &i); + mg->mg_len = i; + } cx->sb_rxtainted |= RX_MATCH_TAINTED(rx); rxres_save(&cx->sb_rxres, rx); RETURNOP(pm->op_pmreplstart); |