summaryrefslogtreecommitdiff
path: root/pad.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 /pad.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 'pad.c')
-rw-r--r--pad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index 0d37ddb5f7..e5fa3b46d6 100644
--- a/pad.c
+++ b/pad.c
@@ -171,12 +171,12 @@ sv_eq_pvn_flags(pTHX_ const SV *sv, const char* pv, const STRLEN pvlen, const U3
SV* svrecode = NULL;
if (SvUTF8(sv)) {
svrecode = newSVpvn(pv2, cur2);
- sv_recode_to_utf8(svrecode, PL_encoding);
+ sv_recode_to_utf8(svrecode, _get_encoding());
pv2 = SvPV_const(svrecode, cur2);
}
else {
svrecode = newSVpvn(pv1, cur1);
- sv_recode_to_utf8(svrecode, PL_encoding);
+ sv_recode_to_utf8(svrecode, _get_encoding());
pv1 = SvPV_const(svrecode, cur1);
}
SvREFCNT_dec_NN(svrecode);