From ad2de1b2b22db677f46346aac18927b2032d7a68 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 14 Nov 2014 11:18:57 -0700 Subject: 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. --- pp_hot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pp_hot.c') 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); -- cgit v1.2.1