Remove two warnings (sub diag() was redefined, and implict split is
[p5sagit/p5-mst-13.2.git] / dump.c
diff --git a/dump.c b/dump.c
index beeba77..1cda173 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -32,11 +32,11 @@ static const char* const svtypenames[SVt_LAST] = {
     "BIND",
     "IV",
     "NV",
-    "RV",
     "PV",
     "PVIV",
     "PVNV",
     "PVMG",
+    "ORANGE",
     "PVGV",
     "PVLV",
     "PVAV",
@@ -52,11 +52,11 @@ static const char* const svshorttypenames[SVt_LAST] = {
     "BIND",
     "IV",
     "NV",
-    "RV",
     "PV",
     "PVIV",
     "PVNV",
     "PVMG",
+    "ORANGE",
     "GV",
     "PVLV",
     "AV",
@@ -1529,7 +1529,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
     }
     if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV
         && type != SVt_PVCV && !isGV_with_GP(sv))
-       || type == SVt_IV) {
+       || (type == SVt_IV && !SvROK(sv))) {
        if (SvIsUV(sv)
 #ifdef PERL_OLD_COPY_ON_WRITE
                       || SvIsCOW(sv)
@@ -2115,7 +2115,7 @@ Perl_xmldump_sub(pTHX_ const GV *gv)
 {
     SV * const sv = sv_newmortal();
 
-    gv_fullname3(sv, gv, Nullch);
+    gv_fullname3(sv, gv, NULL);
     Perl_xmldump_indent(aTHX_ 0, PL_xmlfp, "\nSUB %s = ", SvPVX(sv));
     if (CvXSUB(GvCV(gv)))
        Perl_xmldump_indent(aTHX_ 0, PL_xmlfp, "(xsub 0x%"UVxf" %d)\n",
@@ -2132,7 +2132,7 @@ Perl_xmldump_form(pTHX_ const GV *gv)
 {
     SV * const sv = sv_newmortal();
 
-    gv_fullname3(sv, gv, Nullch);
+    gv_fullname3(sv, gv, NULL);
     Perl_xmldump_indent(aTHX_ 0, PL_xmlfp, "\nFORMAT %s = ", SvPVX(sv));
     if (CvROOT(GvFORM(gv)))
        op_xmldump(CvROOT(GvFORM(gv)));
@@ -2371,9 +2371,6 @@ Perl_sv_xmlpeek(pTHX_ SV *sv)
     case SVt_NV:
        sv_catpv(t, " NV=\"");
        break;
-    case SVt_RV:
-       sv_catpv(t, " RV=\"");
-       break;
     case SVt_PV:
        sv_catpv(t, " PV=\"");
        break;
@@ -2407,6 +2404,9 @@ Perl_sv_xmlpeek(pTHX_ SV *sv)
     case SVt_BIND:
        sv_catpv(t, " BIND=\"");
        break;
+    case SVt_ORANGE:
+       sv_catpv(t, " ORANGE=\"");
+       break;
     case SVt_PVFM:
        sv_catpv(t, " FM=\"");
        break;
@@ -2451,10 +2451,9 @@ Perl_do_pmop_xmldump(pTHX_ I32 level, PerlIO *file, const PMOP *pm)
     Perl_xmldump_indent(aTHX_ level, file, "<pmop \n");
     level++;
     if (PM_GETRE(pm)) {
-       const char * const s = PM_GETRE(pm)->precomp;
-       SV * const tmpsv = newSVpvn("",0);
+       const regexp *const r = PM_GETRE(pm);
+       SV * const tmpsv = newSVpvn(r->precomp,r->prelen);
        SvUTF8_on(tmpsv);
-       sv_catxmlpvn(tmpsv, s, strlen(s), 1);
        Perl_xmldump_indent(aTHX_ level, file, "pre=\"%s\"\n",
             SvPVX(tmpsv));
        SvREFCNT_dec(tmpsv);
@@ -2748,7 +2747,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
            ENTER;
            SAVEFREESV(tmpsv1);
            SAVEFREESV(tmpsv2);
-           gv_fullname3(tmpsv1, (GV*)cSVOPo->op_sv, Nullch);
+           gv_fullname3(tmpsv1, (GV*)cSVOPo->op_sv, NULL);
            s = SvPV(tmpsv1,len);
            sv_catxmlpvn(tmpsv2, s, len, 1);
            S_xmldump_attr(aTHX_ level, file, "gv=\"%s\"", SvPV(tmpsv2, len));