mirror of
https://github.com/pmai/Deflate.git
synced 2025-12-21 21:14:29 +01:00
Add work-around bit-stream-read-bits for ecl bug in (unsigned-byte 8) negation.
The compiler in ecl version 10.7.1 generates erroneous code for the negation of bits in bit-stream-read-bits if bits is declared as an (unsigned-byte 8). Hence we declare bits as a (signed-byte 8) for ecl, given that ecl does not generate optimal code in either case, but correct code for the later case.
This commit is contained in:
@ -287,7 +287,8 @@
|
|||||||
|
|
||||||
(declaim (inline bit-stream-read-bits))
|
(declaim (inline bit-stream-read-bits))
|
||||||
(defun bit-stream-read-bits (stream bits)
|
(defun bit-stream-read-bits (stream bits)
|
||||||
(declare (type bit-stream stream) (type (unsigned-byte 8) bits))
|
(declare (type bit-stream stream) (type #-ecl (unsigned-byte 8)
|
||||||
|
#+ecl (signed-byte 8) bits))
|
||||||
"Read single or multiple bits from the given bit-stream."
|
"Read single or multiple bits from the given bit-stream."
|
||||||
(loop while (< (bit-stream-bit-count stream) bits)
|
(loop while (< (bit-stream-bit-count stream) bits)
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user