diff options
author | Karl Williamson <khw@cpan.org> | 2014-11-14 11:18:57 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-11-20 21:45:18 -0700 |
commit | ad2de1b2b22db677f46346aac18927b2032d7a68 (patch) | |
tree | b1cc07a52e57c44db48737ac6b646fdf30906b5f /sv.c | |
parent | 47e13f24847018e7947377141de64798abfa1ce9 (diff) | |
download | perl-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 'sv.c')
-rw-r--r-- | sv.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3454,7 +3454,7 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extr } if (IN_ENCODING && !(flags & SV_UTF8_NO_ENCODING)) { - sv_recode_to_utf8(sv, PL_encoding); + sv_recode_to_utf8(sv, _get_encoding()); if (extra) SvGROW(sv, SvCUR(sv) + extra); return SvCUR(sv); } @@ -7747,12 +7747,12 @@ Perl_sv_eq_flags(pTHX_ SV *sv1, SV *sv2, const U32 flags) if (IN_ENCODING) { if (SvUTF8(sv1)) { 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); } /* Now both are in UTF-8. */ @@ -7837,7 +7837,7 @@ Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, if (SvUTF8(sv1)) { if (IN_ENCODING) { svrecode = newSVpvn(pv2, cur2); - sv_recode_to_utf8(svrecode, PL_encoding); + sv_recode_to_utf8(svrecode, _get_encoding()); pv2 = SvPV_const(svrecode, cur2); } else { @@ -7849,7 +7849,7 @@ Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, else { if (IN_ENCODING) { svrecode = newSVpvn(pv1, cur1); - sv_recode_to_utf8(svrecode, PL_encoding); + sv_recode_to_utf8(svrecode, _get_encoding()); pv1 = SvPV_const(svrecode, cur1); } else { |