X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_hot.c;h=288bf5c6e64c5aa5e83578ddae214458fd992602;hb=c9fcc6c44229e7c36dee08e5d883d12284a44f17;hp=6ef302c117267d94bd2b265c7380772e2b6af90f;hpb=3818b22bb9ef820a2553aa5e3504220f3b156f21;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_hot.c b/pp_hot.c index 6ef302c..288bf5c 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -22,13 +22,6 @@ #ifdef I_UNISTD #include #endif -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif - /* Hot code. */ @@ -87,6 +80,8 @@ PP(pp_stringify) char *s; s = SvPV(TOPs,len); sv_setpvn(TARG,s,len); + if (SvUTF8(TOPs) && !IN_BYTE) + SvUTF8_on(TARG); SETTARG; RETURN; } @@ -182,7 +177,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 */