This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
What's a backet?
[perl5.git] / dump.c
diff --git a/dump.c b/dump.c
index c2f7746..509df79 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -381,7 +381,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, OP *o)
        PerlIO_printf(file, "    ");
     PerlIO_printf(file,
                  "%*sTYPE = %s  ===> ",
-                 (int)(PL_dumpindent*level-4), "", PL_op_name[o->op_type]);
+                 (int)(PL_dumpindent*level-4), "", OP_NAME(o));
     if (o->op_next) {
        if (o->op_seq)
            PerlIO_printf(file, "%d\n", o->op_next->op_seq);
@@ -994,7 +994,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
     default:
        if (SvEVALED(sv))       sv_catpv(d, "EVALED,");
        if (SvIsUV(sv))         sv_catpv(d, "IsUV,");
-       if (SvUTF8(sv))         sv_catpv(d, "UTF8");
        break;
     case SVt_PVBM:
        if (SvTAIL(sv))         sv_catpv(d, "TAIL,");
@@ -1005,6 +1004,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
                                sv_catpv(d, "TYPED,");
        break;
     }
+    if (SvPOK(sv) && SvUTF8(sv))
+        sv_catpv(d, "UTF8");
 
     if (*(SvEND(d) - 1) == ',')
        SvPVX(d)[--SvCUR(d)] = '\0';
@@ -1190,8 +1191,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
               to the expected number needed for a random hash.
 
               The total number of comparisons is equal to the sum of
-              the squares of the number of entries in each backet.
-              For a random hash of n keys into k backets, the expected
+              the squares of the number of entries in each bucket.
+              For a random hash of n keys into k buckets, the expected
               value is
                                n + n(n-1)/2k
            */
@@ -1252,10 +1253,10 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        do_gvgv_dump(level, file, "  GVGV::GV", CvGV(sv));
        Perl_dump_indent(aTHX_ level, file, "  FILE = \"%s\"\n", CvFILE(sv));
        Perl_dump_indent(aTHX_ level, file, "  DEPTH = %"IVdf"\n", (IV)CvDEPTH(sv));
-#ifdef USE_THREADS
+#ifdef USE_5005THREADS
        Perl_dump_indent(aTHX_ level, file, "  MUTEXP = 0x%"UVxf"\n", PTR2UV(CvMUTEXP(sv)));
        Perl_dump_indent(aTHX_ level, file, "  OWNER = 0x%"UVxf"\n",  PTR2UV(CvOWNER(sv)));
-#endif /* USE_THREADS */
+#endif /* USE_5005THREADS */
        Perl_dump_indent(aTHX_ level, file, "  FLAGS = 0x%"UVxf"\n", (UV)CvFLAGS(sv));
        if (type == SVt_PVFM)
            Perl_dump_indent(aTHX_ level, file, "  LINES = %"IVdf"\n", (IV)FmLINES(sv));