From: Rafael Garcia-Suarez Date: Wed, 22 Jan 2003 21:40:21 +0000 (+0000) Subject: Integrate change 18448 from maint-5.8 : X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3bef8b4a6d7c7e51bf579a6adc7c4edd24022569;p=p5sagit%2Fp5-mst-13.2.git Integrate change 18448 from maint-5.8 : Subject: Partial Data::Dumper patch From: Richard Clamp Date: Sat, 4 Jan 2003 00:52:47 +0000 Message-ID: <20030104005247.GA27685@mirth.demon.co.uk> Subject: Re: Partial Data::Dumper patch From: Slaven Rezic Date: 04 Jan 2003 02:48:08 +0100 Message-ID: <87u1gp4rdz.fsf@vran.herceg.de> p4raw-id: //depot/perl@18572 p4raw-integrated: from //depot/maint-5.8/perl@18571 'copy in' ext/Data/Dumper/t/dumper.t (@17645..) p4raw-integrated: from //depot/maint-5.8/perl@18448 'merge in' ext/Data/Dumper/Dumper.xs (@17645..) --- diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index 8bf9f75..00b52df 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -753,7 +753,7 @@ DD_dump(pTHX_ SV *val, char *name, STRLEN namelen, SV *retval, HV *seenhv, return 1; } } - else { + else if (val != &PL_sv_undef) { SV *namesv; namesv = newSVpvn("\\", 1); sv_catpvn(namesv, name, namelen); diff --git a/ext/Data/Dumper/t/dumper.t b/ext/Data/Dumper/t/dumper.t index 9c7f0a6..e1de62d 100755 --- a/ext/Data/Dumper/t/dumper.t +++ b/ext/Data/Dumper/t/dumper.t @@ -67,11 +67,11 @@ sub TEST { $Data::Dumper::Useperl = 1; if (defined &Data::Dumper::Dumpxs) { print "### XS extension loaded, will run XS tests\n"; - $TMAX = 357; $XS = 1; + $TMAX = 363; $XS = 1; } else { print "### XS extensions not loaded, will NOT run XS tests\n"; - $TMAX = 180; $XS = 0; + $TMAX = 183; $XS = 0; } print "1..$TMAX\n"; @@ -1353,3 +1353,19 @@ EOT TEST q(Data::Dumper->Dumpxs([\\%foo])), "XS quotekeys == 0 for utf8 flagged ASCII" if $XS; } +############# 358 +{ + $WANT = <<'EOT'; +#$VAR1 = [ +# undef, +# undef, +# 1 +#]; +EOT + @foo = (); + $foo[2] = 1; + TEST q(Data::Dumper->Dump([\@foo])), 'Richard Clamp, Message-Id: <20030104005247.GA27685@mirth.demon.co.uk>'; + TEST q(Data::Dumper->Dumpxs([\@foo])) if $XS; +} + +