PVMG can be isUV too.
Nicholas Clark [Tue, 2 Jan 2007 20:47:31 +0000 (20:47 +0000)]
p4raw-id: //depot/perl@29668

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

diff --git a/dump.c b/dump.c
index 7f22181..2a78e78 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1450,8 +1450,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
     case SVt_PVMG:
        if (SvPAD_TYPED(sv))    sv_catpv(d, "TYPED,");
        if (SvPAD_OUR(sv))      sv_catpv(d, "OUR,");
-       if (SvPAD_STATE(sv))    sv_catpv(d, "STATE,");
-       break;
+       /* FALL THROUGH */
     case SVt_PVNV:
        if (SvPAD_STATE(sv))    sv_catpv(d, "STATE,");
        goto evaled_or_uv;
index ed622fd..04546be 100644 (file)
@@ -14,7 +14,7 @@ BEGIN { require "./test.pl"; }
 
 use Devel::Peek;
 
-plan(23);
+plan(24);
 
 our $DEBUG = 0;
 open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!";
@@ -503,3 +503,13 @@ do_test(23,
     OUTSIDE_SEQ = 0
     PADLIST = 0x0
     OUTSIDE = 0x0 \\(null\\)');        
+
+# isUV should show on PVMG
+do_test(24,
+       do { my $v = $1; $v = ~0; $v },
+'SV = PVMG\\($ADDR\\) at $ADDR
+  REFCNT = 1
+  FLAGS = \\(IOK,pIOK,IsUV\\)
+  UV = \d+
+  NV = 0
+  PV = 0');