mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
removed UNALIGNED() macro from educational decoder
as this name collides with existing macro in mingw64+clang9.
This commit is contained in:
@ -1529,7 +1529,7 @@ void free_dictionary(dictionary_t *const dict) {
|
|||||||
/******* END DICTIONARY PARSING ***********************************************/
|
/******* END DICTIONARY PARSING ***********************************************/
|
||||||
|
|
||||||
/******* IO STREAM OPERATIONS *************************************************/
|
/******* IO STREAM OPERATIONS *************************************************/
|
||||||
#define UNALIGNED() ERROR("Attempting to operate on a non-byte aligned stream")
|
|
||||||
/// Reads `num` bits from a bitstream, and updates the internal offset
|
/// Reads `num` bits from a bitstream, and updates the internal offset
|
||||||
static inline u64 IO_read_bits(istream_t *const in, const int num_bits) {
|
static inline u64 IO_read_bits(istream_t *const in, const int num_bits) {
|
||||||
if (num_bits > 64 || num_bits <= 0) {
|
if (num_bits > 64 || num_bits <= 0) {
|
||||||
@ -1608,7 +1608,7 @@ static inline const u8 *IO_get_read_ptr(istream_t *const in, size_t len) {
|
|||||||
INP_SIZE();
|
INP_SIZE();
|
||||||
}
|
}
|
||||||
if (in->bit_offset != 0) {
|
if (in->bit_offset != 0) {
|
||||||
UNALIGNED();
|
ERROR("Attempting to operate on a non-byte aligned stream");
|
||||||
}
|
}
|
||||||
const u8 *const ptr = in->ptr;
|
const u8 *const ptr = in->ptr;
|
||||||
in->ptr += len;
|
in->ptr += len;
|
||||||
@ -1634,7 +1634,7 @@ static inline void IO_advance_input(istream_t *const in, size_t len) {
|
|||||||
INP_SIZE();
|
INP_SIZE();
|
||||||
}
|
}
|
||||||
if (in->bit_offset != 0) {
|
if (in->bit_offset != 0) {
|
||||||
UNALIGNED();
|
ERROR("Attempting to operate on a non-byte aligned stream");
|
||||||
}
|
}
|
||||||
|
|
||||||
in->ptr += len;
|
in->ptr += len;
|
||||||
|
Reference in New Issue
Block a user