summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-19 07:51:39 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-19 07:51:39 +0000
commit560a288e13336a11c08649232e4f81decff70a5d (patch)
treebe4aa56ad6e5af2d78e1a0b9e76c4c6423c47874 /pp_hot.c
parent8d2a6795a8433e9623ccf677a19bf470170549e9 (diff)
downloadperl-560a288e13336a11c08649232e4f81decff70a5d.tar.gz
make comparisons promote to utf8 as necessary (from Gisle Aas)
p4raw-id: //depot/perl@5138
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 8dab65150c..ddb900f261 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -184,7 +184,16 @@ PP(pp_concat)
}
}
#endif
+ if (DO_UTF8(right))
+ sv_utf8_upgrade(TARG);
sv_catpvn(TARG,s,len);
+ if (!IN_BYTE) {
+ if (SvUTF8(right))
+ SvUTF8_on(TARG);
+ }
+ else if (!SvUTF8(right)) {
+ SvUTF8_off(TARG);
+ }
}
else
sv_setpvn(TARG,s,len); /* suppress warning */