This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "UTF8f"
authorKarl Williamson <public@khwilliamson.com>
Wed, 26 Jun 2013 00:40:42 +0000 (18:40 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 26 Jun 2013 00:59:51 +0000 (18:59 -0600)
This reverts commit 670610ebb17508101065cc5f5ecfe616aace5335.

This and the other UTF8f patch are causing significant problems on some
configurations on 32-bit platforms.  We've decided to revert them until
they can be resubmitted after the kinks get ironed out.

gv.c
perl.h
sv.c
t/porting/diag.t

diff --git a/gv.c b/gv.c
index 86d34b1..87e94b0 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1042,10 +1042,10 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
                }
 
                Perl_croak(aTHX_
-                          "Can't locate object method \"%"UTF8f
-                          "\" via package \"%"SVf"\""
+                          "Can't locate object method \"%"SVf"\" via package \"%"SVf"\""
                           " (perhaps you forgot to load \"%"SVf"\"?)",
-                          is_utf8, nend - name, name,
+                          SVfARG(newSVpvn_flags(name, nend - name,
+                                SVs_TEMP | is_utf8)),
                            SVfARG(packnamesv), SVfARG(packnamesv));
            }
        }
diff --git a/perl.h b/perl.h
index df24486..613fd3c 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3038,11 +3038,6 @@ typedef pthread_key_t    perl_key;
 
 #define HEKfARG(p) ((void*)(p))
 
-/* Takes three arguments: is_utf8, length, str */
-#ifndef UTF8f
-#  define UTF8f "u%"UVuf"%4p"
-#endif
-
 #ifdef PERL_CORE
 /* not used; but needed for backward compatibility with XS code? - RMB */
 #  undef VDf
diff --git a/sv.c b/sv.c
index cc93089..35bb1a8 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -10467,8 +10467,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
                %-<num>p        include an SV with precision <num>      
                %2p             include a HEK
                %3p             include a HEK with precision of 256
-               %4p             char* preceded by utf8 flag and length
-               %<num>p         (where num is 1 or > 4) reserved for future
+               %<num>p         (where num != 2 or 3) reserved for future
                                extensions
 
        Robin Barker 2005-07-14 (but modified since)
@@ -10480,13 +10479,6 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
            STRLEN n = 0;
            if (*q == '-')
                sv = *q++;
-           else if (strnEQ(q, UTF8f, sizeof(UTF8f)-1)) { /* UTF8f */
-               is_utf8 = cBOOL(va_arg(*args, UV));
-               elen = va_arg(*args, STRLEN);
-               eptr = va_arg(*args, char *);
-               q += sizeof(UTF8f)-1;
-               goto string;
-           }
            n = expect_number(&q);
            if (*q++ == 'p') {
                if (sv) {                       /* SVf */
index 69d9363..729abaf 100644 (file)
@@ -162,7 +162,6 @@ my %specialformats = (IVdf => 'd',
                      NVgf => 'f',
                      HEKf256=>'s',
                      HEKf => 's',
-                     UTF8f=> 's',
                      SVf256=>'s',
                      SVf32=> 's',
                      SVf  => 's');