From: Nicholas Clark Date: Sat, 26 Jan 2008 10:24:40 +0000 (+0000) Subject: Change 33069 missed updating dump.c to dump PVIOs correctly. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0a413d1892b414bcca7420c00e6725079449e3c;p=p5sagit%2Fp5-mst-13.2.git Change 33069 missed updating dump.c to dump PVIOs correctly. p4raw-id: //depot/perl@33071 --- diff --git a/dump.c b/dump.c index 3e4db86..3147286 100644 --- a/dump.c +++ b/dump.c @@ -1554,7 +1554,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo (UV) COP_SEQ_RANGE_HIGH(sv)); } else if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV && type != SVt_PVCV && type != SVt_PVFM && type != SVt_REGEXP - && !isGV_with_GP(sv) && !SvVALID(sv)) + && type != SVt_PVIO && !isGV_with_GP(sv) && !SvVALID(sv)) || type == SVt_NV) { STORE_NUMERIC_LOCAL_SET_STANDARD(); /* %Vg doesn't work? --jhi */ diff --git a/ext/Devel/Peek/t/Peek.t b/ext/Devel/Peek/t/Peek.t index 47f8ab2..e62ffdf 100644 --- a/ext/Devel/Peek/t/Peek.t +++ b/ext/Devel/Peek/t/Peek.t @@ -14,7 +14,7 @@ BEGIN { require "./test.pl"; } use Devel::Peek; -plan(48); +plan(50); our $DEBUG = 0; open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!"; @@ -45,6 +45,9 @@ sub do_test { ($] < 5.009) ? " IV = 0\n NV = 0\n" : ''; /mge; $pattern =~ s/\$RV/IV/g if $] >= 5.011; + $pattern =~ s/^ *\$NV *\n/ + ($] < 5.011) ? " NV = 0\n" : ''; + /mge; print $pattern, "\n" if $DEBUG; my ($dump, $dump2) = split m/\*\*\*\*\*\n/, scalar ; @@ -541,3 +544,28 @@ do_test(24, UV = \d+ NV = 0 PV = 0'); + +do_test(25, + *STDOUT{IO}, +'SV = $RV\\($ADDR\\) at $ADDR + REFCNT = 1 + FLAGS = \\(ROK\\) + RV = $ADDR + SV = PVIO\\($ADDR\\) at $ADDR + REFCNT = 3 + FLAGS = \\(OBJECT\\) + IV = 0 + $NV + STASH = $ADDR\s+"IO::Handle" + IFP = $ADDR + OFP = $ADDR + DIRP = 0x0 + LINES = 0 + PAGE = 0 + PAGE_LEN = 60 + LINES_LEFT = 0 + TOP_GV = 0x0 + FMT_GV = 0x0 + BOTTOM_GV = 0x0 + TYPE = \'>\' + FLAGS = 0x0');