summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-21 13:42:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-21 13:42:31 +0000
commite53790c1de51b5453ccdee177a995225bf5154c2 (patch)
tree26466a7871334adf8f9046f7f04f93c049c9549b /ext/B
parent03fed38d20c6ad958c9c8a42fd30941b5768a7c8 (diff)
downloadperl-e53790c1de51b5453ccdee177a995225bf5154c2.tar.gz
packing I32 with L is not nice, need l; from Wolfgang Laun.
p4raw-id: //depot/perl@13830
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/B/Assembler.pm2
-rw-r--r--ext/B/B/Disassembler.pm2
-rw-r--r--ext/B/t/assembler.t2
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/B/B/Assembler.pm b/ext/B/B/Assembler.pm
index 4db23f18bc..429405fd36 100644
--- a/ext/B/B/Assembler.pm
+++ b/ext/B/B/Assembler.pm
@@ -72,7 +72,7 @@ sub B::Asmdata::PUT_U32 {
}
sub B::Asmdata::PUT_I32 {
my $arg = limcheck( $_[0], -0x80000000, 0x7fffffff, 'I32' );
- pack("L", $arg);
+ pack("l", $arg);
}
sub B::Asmdata::PUT_NV { sprintf("%s\0", $_[0]) } # "%lf" looses precision and pack('d',...)
# may not even be portable between compilers
diff --git a/ext/B/B/Disassembler.pm b/ext/B/B/Disassembler.pm
index b8b5262f41..a50b48f741 100644
--- a/ext/B/B/Disassembler.pm
+++ b/ext/B/B/Disassembler.pm
@@ -56,7 +56,7 @@ sub GET_I32 {
my $fh = shift;
my $str = $fh->readn(4);
croak "reached EOF while reading I32" unless length($str) == 4;
- return cast_I32(unpack("L", $str));
+ return unpack("l", $str);
}
sub GET_objindex {
diff --git a/ext/B/t/assembler.t b/ext/B/t/assembler.t
index 6bec7e091b..3e987e092a 100644
--- a/ext/B/t/assembler.t
+++ b/ext/B/t/assembler.t
@@ -197,7 +197,7 @@ sub putdis(@){
#
sub gen_type($$$){
my( $href, $descref, $text ) = @_;
- for my $odt ( keys( %opsByType ) ){
+ for my $odt ( sort( keys( %opsByType ) ) ){
my $opcode = $opsByType{$odt}->[0];
my $sel = $odt;
$sel =~ s/^GET_//;