This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a union in place of xnv_nv, which allows AVs and HVs to re-use
[perl5.git] / dump.c
diff --git a/dump.c b/dump.c
index 547af9f..c820687 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1277,7 +1277,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        SvREFCNT_dec(d);
        return;
     }
-    if (type >= SVt_PVIV || type == SVt_IV) {
+    if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV)
+       || type == SVt_IV) {
        if (SvIsUV(sv)
 #ifdef PERL_COPY_ON_WRITE
                       || SvIsCOW(sv)
@@ -1296,7 +1297,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
 #endif
        PerlIO_putc(file, '\n');
     }
-    if (type >= SVt_PVNV || type == SVt_NV) {
+    if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV)
+       || type == SVt_NV) {
        STORE_NUMERIC_LOCAL_SET_STANDARD();
        /* %Vg doesn't work? --jhi */
 #ifdef USE_LONG_DOUBLE