From: Malcolm Beattie Date: Wed, 16 Jul 1997 17:02:09 +0000 (+0000) Subject: Change %lx to %x in B::CV::save to prevent some CV X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d2c164192c9f3b5d39341a8e91522fc02e2121f;p=p5sagit%2Fp5-mst-13.2.git Change %lx to %x in B::CV::save to prevent some CV fields becoming 0 in the init section. Add missing write_back in B::Stackobj::Padsv::load_double to fix test 22 of op/my.t. p4raw-id: //depot/perlext/Compiler@38 --- diff --git a/B/C.pm b/B/C.pm index 39cbb49..806ec37 100644 --- a/B/C.pm +++ b/B/C.pm @@ -582,27 +582,27 @@ sub B::CV::save { warn "No definition for sub %s::%s (unable to autoload)\n", $cvstashname, $cvname; # debug } - $symsect->add(sprintf("xpvcvix%d\t%s, %u, 0, %d, %s, 0, Nullhv, Nullhv, %s, s\\_%lx, $xsub, $xsubany, Nullgv, Nullgv, %d, s\\_%lx, (CV*)s\\_%lx, 0", + $symsect->add(sprintf("xpvcvix%d\t%s, %u, 0, %d, %s, 0, Nullhv, Nullhv, %s, s\\_%x, $xsub, $xsubany, Nullgv, Nullgv, %d, s\\_%x, (CV*)s\\_%x, 0", $xpvcv_ix, cstring($pv), length($pv), $cv->IVX, $cv->NVX, $startfield, ${$cv->ROOT}, $cv->DEPTH, $$padlist, ${$cv->OUTSIDE})); if ($$gv) { $gv->save; - $init->add(sprintf("CvGV(s\\_%lx) = s\\_%lx;",$$cv,$$gv)); + $init->add(sprintf("CvGV(s\\_%x) = s\\_%x;",$$cv,$$gv)); warn sprintf("done saving GV 0x%x for CV 0x%x\n", $$gv, $$cv) if $debug_cv; } my $filegv = $cv->FILEGV; if ($$filegv) { $filegv->save; - $init->add(sprintf("CvFILEGV(s\\_%lx) = s\\_%lx;", $$cv, $$filegv)); + $init->add(sprintf("CvFILEGV(s\\_%x) = s\\_%x;", $$cv, $$filegv)); warn sprintf("done saving FILEGV 0x%x for CV 0x%x\n", $$filegv, $$cv) if $debug_cv; } my $stash = $cv->STASH; if ($$stash) { $stash->save; - $init->add(sprintf("CvSTASH(s\\_%lx) = s\\_%lx;", $$cv, $$stash)); + $init->add(sprintf("CvSTASH(s\\_%x) = s\\_%x;", $$cv, $$stash)); warn sprintf("done saving STASH 0x%x for CV 0x%x\n", $$stash, $$cv) if $debug_cv; } diff --git a/B/Stackobj.pm b/B/Stackobj.pm index fa9de7d..8be047f 100644 --- a/B/Stackobj.pm +++ b/B/Stackobj.pm @@ -183,6 +183,7 @@ sub B::Stackobj::Padsv::load_int { sub B::Stackobj::Padsv::load_double { my $obj = shift; + $obj->write_back; runtime("$obj->{nv} = SvNV($obj->{sv});"); $obj->{flags} |= VALID_DOUBLE; }