From: Jarkko Hietaniemi Date: Tue, 13 Mar 2001 22:50:05 +0000 (+0000) Subject: Integrate perlio: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac4d53d5579163b3f737e966d72cf1cc106c705d;p=p5sagit%2Fp5-mst-13.2.git Integrate perlio: [ 9126] #ifdef'ed out code to make packed side of pack/unpack octets. (i.e. pack('U') => encode_utf8). p4raw-link: @9126 on //depot/perlio: d815558d76680455c3455ca148e9c280db95eb71 p4raw-id: //depot/perl@9135 p4raw-integrated: from //depot/perlio@9134 'copy in' pp.c (@9096..) --- diff --git a/pp.c b/pp.c index e02e002..1d3e365 100644 --- a/pp.c +++ b/pp.c @@ -4036,6 +4036,7 @@ S_mul128(pTHX_ SV *sv, U8 m) #define ISUUCHAR(ch) (memchr(PL_uuemap, (ch), sizeof(PL_uuemap)-1) || (ch) == ' ') #endif + PP(pp_unpack) { dSP; @@ -4046,7 +4047,7 @@ PP(pp_unpack) STRLEN llen; STRLEN rlen; register char *pat = SvPV(left, llen); -#if 0 +#ifdef PACKED_IS_OCTETS /* Packed side is assumed to be octets - so force downgrade if it has been UTF-8 encoded by accident */ @@ -5180,8 +5181,10 @@ PP(pp_pack) patcopy++; continue; } +#ifndef PACKED_IS_OCTETS if (datumtype == 'U' && pat == patcopy+1) SvUTF8_on(cat); +#endif if (datumtype == '#') { while (pat < patend && *pat != '\n') pat++;