binary-structures icon indicating copy to clipboard operation
binary-structures copied to clipboard

fixed size vectors don't work?

Open 3b opened this issue 2 years ago • 0 comments

(define-io-structure aa
  (b (vector uint8 3)))

(let ((a (coerce '(1 2 3) '(simple-array (unsigned-byte 8) 1))))
  (read-aa a))

fails with

Value of
(SB-KERNEL:ALLOCATE-VECTOR 157 SB-C::%LENGTH SB-C::NWORDS) in
(SB-KERNEL:THE*
 ((ARRAY (UNSIGNED-BYTE 8) (3)) :CONTEXT (SB-KERNEL::STRUCT-CONTEXT AA . B))
 #:B)

is
  #(),
not a
  (VECTOR (UNSIGNED-BYTE 8) 3).

(WARNs about the same thing during compilation as well

3b avatar Dec 23 '23 17:12 3b