diff options
author | Karl Williamson <khw@cpan.org> | 2014-11-11 22:25:37 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-11-20 21:45:17 -0700 |
commit | 47e13f24847018e7947377141de64798abfa1ce9 (patch) | |
tree | db1ff966fdee5975456f1c95707f9210b8473551 /sv.c | |
parent | dd90e537d39b34eadaee8ce4df4561bd428f0f9d (diff) | |
download | perl-47e13f24847018e7947377141de64798abfa1ce9.tar.gz |
Make testing for PL_encoding into a macro
This is in preparation for making the test more complicated.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3453,7 +3453,7 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extr S_sv_uncow(aTHX_ sv, 0); } - if (PL_encoding && !(flags & SV_UTF8_NO_ENCODING)) { + if (IN_ENCODING && !(flags & SV_UTF8_NO_ENCODING)) { sv_recode_to_utf8(sv, PL_encoding); if (extra) SvGROW(sv, SvCUR(sv) + extra); return SvCUR(sv); @@ -7744,7 +7744,7 @@ Perl_sv_eq_flags(pTHX_ SV *sv1, SV *sv2, const U32 flags) if (cur1 && cur2 && SvUTF8(sv1) != SvUTF8(sv2) && !IN_BYTES) { /* Differing utf8ness. * Do not UTF8size the comparands as a side-effect. */ - if (PL_encoding) { + if (IN_ENCODING) { if (SvUTF8(sv1)) { svrecode = newSVpvn(pv2, cur2); sv_recode_to_utf8(svrecode, PL_encoding); @@ -7835,7 +7835,7 @@ Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, /* Differing utf8ness. * Do not UTF8size the comparands as a side-effect. */ if (SvUTF8(sv1)) { - if (PL_encoding) { + if (IN_ENCODING) { svrecode = newSVpvn(pv2, cur2); sv_recode_to_utf8(svrecode, PL_encoding); pv2 = SvPV_const(svrecode, cur2); @@ -7847,7 +7847,7 @@ Perl_sv_cmp_flags(pTHX_ SV *const sv1, SV *const sv2, } } else { - if (PL_encoding) { + if (IN_ENCODING) { svrecode = newSVpvn(pv1, cur1); sv_recode_to_utf8(svrecode, PL_encoding); pv1 = SvPV_const(svrecode, cur1); |