Skip to content
Permalink
Browse files

The endianness parameter of read-int8/uint8 is meaningless

So ignore its value and just go for native
  • Loading branch information...
lizmat committed Dec 11, 2018
1 parent 4f14d71 commit 011c6f11d49862becc684bbc6b47e97d766969ef
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/core/Buf.pm6
@@ -129,11 +129,9 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
}

# for simplicity's sake, these are not multis
method read-int8(
int $offset, Endian $endian = native-endian --> int
) is raw {
method read-int8( int $offset, Endian $? --> int) is raw {
nqp::readint(self,$offset,
nqp::bitor_i(BINARY_SIZE_8_BIT,$endian))
nqp::bitor_i(BINARY_SIZE_8_BIT,BINARY_ENDIAN_NATIVE))
}
method read-int16(
int $offset, Endian $endian = native-endian --> int
@@ -154,11 +152,9 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
nqp::bitor_i(BINARY_SIZE_64_BIT,$endian))
}

method read-uint8(
int $offset, Endian $endian = native-endian --> uint
) is raw {
method read-uint8(int $offset, Endian $? --> uint) is raw {
nqp::readuint(self,$offset,
nqp::bitor_i(BINARY_SIZE_8_BIT,$endian))
nqp::bitor_i(BINARY_SIZE_8_BIT,BINARY_ENDIAN_NATIVE))
}
method read-uint16(
int $offset, Endian $endian = native-endian --> uint

0 comments on commit 011c6f1

Please sign in to comment.
You can’t perform that action at this time.