Curiously none of the macros SvIVX, SvUVX or SvNVX are used on
authorNicholas Clark <nick@ccl4.org>
Sat, 25 Feb 2006 15:11:28 +0000 (15:11 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 25 Feb 2006 15:11:28 +0000 (15:11 +0000)
typeglobs.

p4raw-id: //depot/perl@27325

dump.c
ext/Devel/Peek/t/Peek.t
sv.h

diff --git a/dump.c b/dump.c
index 2c6aa23ed201618b41485ccd62c90ebfe373b9c1..478cc17f1f818772c7be10bd4a55a1a2d7ab25a9 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1281,8 +1281,9 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        SvREFCNT_dec(d);
        return;
     }
-    if (type == SVt_IV || (type >= SVt_PVIV && type != SVt_PVAV
-                          && type != SVt_PVHV && type != SVt_PVCV)) {
+    if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV
+        && type != SVt_PVCV && !isGV_with_GP(sv))
+       || type == SVt_IV) {
        if (SvIsUV(sv)
 #ifdef PERL_OLD_COPY_ON_WRITE
                       || SvIsCOW(sv)
@@ -1302,7 +1303,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        PerlIO_putc(file, '\n');
     }
     if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV
-        && type != SVt_PVCV && type != SVt_PVFM)
+        && type != SVt_PVCV && type != SVt_PVFM && !isGV_with_GP(sv))
        || type == SVt_NV) {
        STORE_NUMERIC_LOCAL_SET_STANDARD();
        /* %Vg doesn't work? --jhi */
index fdf57a9e8941b9f2cc81ea5cbe806f8f92aa5a52..f40bc5e075ae763594ef3865221e37fd02c10379 100644 (file)
@@ -306,8 +306,6 @@ do_test(17,
 'SV = PVGV\\($ADDR\\) at $ADDR
   REFCNT = 5
   FLAGS = \\(SCREAM,MULTI(?:,IN_PAD)?\\)
-  IV = 0
-  NV = 0
   NAME = "a"
   NAMELEN = 1
   GvSTASH = $ADDR\\t"main"
diff --git a/sv.h b/sv.h
index c509ac664966cf82ab953a9fc89f5ccde377a9e8..1d62a885972563607ea392eea853b2cd9762bda2 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1019,6 +1019,7 @@ in gv.h: */
            assert(SvTYPE(_svi) != SVt_PVAV);                           \
            assert(SvTYPE(_svi) != SVt_PVHV);                           \
            assert(SvTYPE(_svi) != SVt_PVCV);                           \
+           assert(!isGV_with_GP(_svi));                                \
            &(((XPVIV*) SvANY(_svi))->xiv_iv);                          \
         }))
 #    define SvUVX(sv)                                                  \
@@ -1027,6 +1028,7 @@ in gv.h: */
            assert(SvTYPE(_svi) != SVt_PVAV);                           \
            assert(SvTYPE(_svi) != SVt_PVHV);                           \
            assert(SvTYPE(_svi) != SVt_PVCV);                           \
+           assert(!isGV_with_GP(_svi));                                \
            &(((XPVUV*) SvANY(_svi))->xuv_uv);                          \
         }))
 #    define SvNVX(sv)                                                  \
@@ -1035,6 +1037,7 @@ in gv.h: */
            assert(SvTYPE(_svi) != SVt_PVAV);                           \
            assert(SvTYPE(_svi) != SVt_PVHV);                           \
            assert(SvTYPE(_svi) != SVt_PVFM);                           \
+           assert(!isGV_with_GP(_svi));                                \
           &(((XPVNV*) SvANY(_svi))->xnv_nv);                           \
         }))
 #    define SvMAGIC(sv)                                                        \