From: Nick Ing-Simmons Date: Tue, 13 Mar 2001 20:39:51 +0000 (+0000) Subject: #ifdef'ed out code to make packed side of pack/unpack X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d815558d76680455c3455ca148e9c280db95eb71;p=p5sagit%2Fp5-mst-13.2.git #ifdef'ed out code to make packed side of pack/unpack octets. (i.e. pack('U') => encode_utf8). p4raw-id: //depot/perlio@9126 --- 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++;