Skip to content

Commit

Permalink
Remove read-uint128 hack now that we have Kernel.Endian
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 12, 2018
1 parent 2a761ca commit 543219c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Buf.pm6
@@ -1,3 +1,4 @@
my class Kernel { ... }
my class X::Assignment::RO { ... }
my class X::Buf::AsStr { ... }
my class X::Buf::Pack { ... }
Expand Down Expand Up @@ -190,7 +191,8 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
) is raw {
my \first := self.read-uint64($offset, $endian);
my \second := self.read-uint64($offset + 8, $endian);
$endian == BigEndian # XXX fix for native BigEndian systems
$endian == BigEndian
|| ($endian == NativeEndian && Kernel.Endian == BigEndian)
?? first +< 64 +| second
!! second +< 64 +| first
}
Expand Down

0 comments on commit 543219c

Please sign in to comment.