|
(with-packages-unlocked (cl) |
Loading this file in LispWorks gives this error:
Defining function (SETF STREAM-ELEMENT-TYPE) visible from package COMMON-LISP { handle-warn-on-redefinition is :ERROR }
I fixed this in our copy (from quicklisp) by wrapping the with-packages-unlocked with:
(let (#+lispworks (lw:*handle-warn-on-redefinition* :quiet))
(with-packages-unlocked (cl)
(defmethod (setf stream-element-type) (new-val (stream bitio-stream))
(with-accessors ((byte-size bitio::default-bits-per-byte)) stream
(assert (eq 'unsigned-byte (car new-val)))
(setf byte-size (second new-val))))))
BTW: The fact that this and the with-packages-unlocked is needed tells you you are probably doing something wrong. In this case, it is wrong because you are defining (setf stream-element-type), even though the generic function is not applicable to stream instances in general. It should be (setf bitio-stream-element-type). Even better, since it only sets the "byte-size", it would be better to have an accessor bitio-stream-byte-size that returns it and can be used in setf.
bitio/contrib/gray.lisp
Line 80 in c295a66
Loading this file in LispWorks gives this error:
Defining function (SETF STREAM-ELEMENT-TYPE) visible from package COMMON-LISP { handle-warn-on-redefinition is :ERROR }
I fixed this in our copy (from quicklisp) by wrapping the with-packages-unlocked with:
BTW: The fact that this and the with-packages-unlocked is needed tells you you are probably doing something wrong. In this case, it is wrong because you are defining (setf stream-element-type), even though the generic function is not applicable to stream instances in general. It should be (setf bitio-stream-element-type). Even better, since it only sets the "byte-size", it would be better to have an accessor bitio-stream-byte-size that returns it and can be used in setf.