summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-11-11 22:25:37 -0700
committerKarl Williamson <khw@cpan.org>2014-11-20 21:45:17 -0700
commit47e13f24847018e7947377141de64798abfa1ce9 (patch)
treedb1ff966fdee5975456f1c95707f9210b8473551 /pp_hot.c
parentdd90e537d39b34eadaee8ce4df4561bd428f0f9d (diff)
downloadperl-47e13f24847018e7947377141de64798abfa1ce9.tar.gz
Make testing for PL_encoding into a macro
This is in preparation for making the test more complicated.
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 55e2c970c5..bf992e44d9 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2186,7 +2186,7 @@ PP(pp_subst)
if (DO_UTF8(TARG) && !doutf8) {
nsv = sv_newmortal();
SvSetSV(nsv, dstr);
- if (PL_encoding)
+ if (IN_ENCODING)
sv_recode_to_utf8(nsv, PL_encoding);
else
sv_utf8_upgrade(nsv);
@@ -2367,7 +2367,7 @@ PP(pp_subst)
first = FALSE;
}
else {
- if (PL_encoding) {
+ if (IN_ENCODING) {
if (!nsv) nsv = sv_newmortal();
sv_copypv(nsv, repl);
if (!DO_UTF8(nsv)) sv_recode_to_utf8(nsv, PL_encoding);