summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-11-14 11:18:57 -0700
committerKarl Williamson <khw@cpan.org>2014-11-20 21:45:18 -0700
commitad2de1b2b22db677f46346aac18927b2032d7a68 (patch)
treeb1cc07a52e57c44db48737ac6b646fdf30906b5f /pp_hot.c
parent47e13f24847018e7947377141de64798abfa1ce9 (diff)
downloadperl-ad2de1b2b22db677f46346aac18927b2032d7a68.tar.gz
Make a function to get PL_encoding's value
This is in preparation for making the retrieval more complex in future commits than it is now. This is going into mg.c because the value is magical.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index bf992e44d9..49085257e2 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2187,7 +2187,7 @@ PP(pp_subst)
nsv = sv_newmortal();
SvSetSV(nsv, dstr);
if (IN_ENCODING)
- sv_recode_to_utf8(nsv, PL_encoding);
+ sv_recode_to_utf8(nsv, _get_encoding());
else
sv_utf8_upgrade(nsv);
c = SvPV_const(nsv, clen);
@@ -2370,7 +2370,7 @@ PP(pp_subst)
if (IN_ENCODING) {
if (!nsv) nsv = sv_newmortal();
sv_copypv(nsv, repl);
- if (!DO_UTF8(nsv)) sv_recode_to_utf8(nsv, PL_encoding);
+ if (!DO_UTF8(nsv)) sv_recode_to_utf8(nsv, _get_encoding());
sv_catsv(dstr, nsv);
}
else sv_catsv(dstr, repl);