]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed UNALIGNED() macro from educational decoder
authorYann Collet <cyan@fb.com>
Thu, 17 Oct 2019 00:27:03 +0000 (17:27 -0700)
committerYann Collet <cyan@fb.com>
Thu, 17 Oct 2019 00:27:03 +0000 (17:27 -0700)
as this name collides with existing macro in mingw64+clang9.

doc/educational_decoder/zstd_decompress.c

index 53ac52e422c797e414100a2318075e30376c3d1d..64e1b8738d0641d5f46dbfdb0dd60575cfe8c5cb 100644 (file)
@@ -1529,7 +1529,7 @@ void free_dictionary(dictionary_t *const dict) {
 /******* END DICTIONARY PARSING ***********************************************/
 
 /******* 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
 static inline u64 IO_read_bits(istream_t *const in, const int num_bits) {
     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();
     }
     if (in->bit_offset != 0) {
-        UNALIGNED();
+        ERROR("Attempting to operate on a non-byte aligned stream");
     }
     const u8 *const ptr = in->ptr;
     in->ptr += len;
@@ -1634,7 +1634,7 @@ static inline void IO_advance_input(istream_t *const in, size_t len) {
          INP_SIZE();
     }
     if (in->bit_offset != 0) {
-        UNALIGNED();
+        ERROR("Attempting to operate on a non-byte aligned stream");
     }
 
     in->ptr += len;