From: Nicholas Clark Date: Sat, 12 Nov 2005 09:15:32 +0000 (+0000) Subject: Make the removal of references to AvFLAGS in the B modules conditional X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb7c595be2e30a806b95ad83e9d3613aeb95c384;p=p5sagit%2Fp5-mst-13.2.git Make the removal of references to AvFLAGS in the B modules conditional on perl version. p4raw-id: //depot/perl@26091 --- diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index 5c3c6ba..1179767 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -1182,14 +1182,19 @@ sub B::AV::save { my ($av) = @_; my $sym = objsym($av); return $sym if defined $sym; - $xpvavsect->add(sprintf("0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0")); + my $line = "0, -1, -1, 0, 0.0, 0, Nullhv, 0, 0"; + $line .= sprintf(", 0x%x", $av->AvFLAGS) if $] < 5.009; + $xpvavsect->add($line); $svsect->add(sprintf("&xpvav_list[%d], %lu, 0x%x", $xpvavsect->index, $av->REFCNT , $av->FLAGS)); my $sv_list_index = $svsect->index; my $fill = $av->FILL; $av->save_magic; - warn sprintf("saving AV 0x%x FILL=$fill", $$av) - if $debug_av; + if ($debug_av) { + $line = sprintf("saving AV 0x%x FILL=$fill", $$av); + $line .= sprintf(" AvFLAGS=0x%x", $av->AvFLAGS) if $] < 5.009; + warn $line; + } # XXX AVf_REAL is wrong test: need to save comppadlist but not stack #if ($fill > -1 && ($avflags & AVf_REAL)) { if ($fill > -1) { diff --git a/ext/B/B/Debug.pm b/ext/B/B/Debug.pm index 9a3e70d..8b34a1d 100644 --- a/ext/B/B/Debug.pm +++ b/ext/B/B/Debug.pm @@ -232,6 +232,9 @@ sub B::AV::debug { MAX %d OFF %d EOT + printf <<'EOT', $av->AvFLAGS if $] < 5.009; + AvFLAGS %d +EOT } sub B::GV::debug {