summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-28 08:42:47 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-10-01 12:51:55 -0700
commit73a087f073d55a8dddc70e22246f3c4f5b48e2db (patch)
tree47083d0fcb62c8ea60067aa4588e1f64af886453 /mg.c
parent77fc86efb3d857a4cf2bb67c2b84391d55c9732d (diff)
downloadperl-73a087f073d55a8dddc70e22246f3c4f5b48e2db.tar.gz
Make substr = $utf8 call get-magic once
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 7b13f615e3..b792b2c5c3 100644
--- a/mg.c
+++ b/mg.c
@@ -2271,7 +2271,7 @@ Perl_magic_setsubstr(pTHX_ SV *sv, MAGIC *mg)
Perl_croak(aTHX_ "substr outside of string");
oldtarglen = lvlen;
if (DO_UTF8(sv)) {
- sv_utf8_upgrade(lsv);
+ sv_utf8_upgrade_nomg(lsv);
lvoff = sv_pos_u2b_flags(lsv, lvoff, &lvlen, SV_CONST_RETURN);
sv_insert_flags(lsv, lvoff, lvlen, tmps, len, 0);
newtarglen = sv_len_utf8(sv);