Plaster
New
List
Login
common-lisp
default
shinmera
2021.06.16 21:08:54
(defstruct (vector-input (:constructor make-vector-input (vector index))) (vector NIL :type (simple-array (unsigned-byte 8) *) :read-only T) (index 0 :type fixnum)) (defun foo (io) (nibbles:ub32ref/le (vector-input-vector io) (vector-input-index io)))
Raw
Annotate
Repaste
Annotations
common-lisp
default
shinmera
2021.06.16 21:09:12
(ql:quickload :nibbles) (load (compile-file "~/test.lisp")) (foo (make-vector-input (make-array 4 :element-type '(unsigned-byte 8) :initial-contents '(1 2 3 4)) 0)) ;; => The function NIBBLES::%UB32REF/LE is undefined. ;; And yet: (nibbles:ub32ref/le (make-array 4 :element-type '(unsigned-byte 8) :initial-contents '(1 2 3 4)) 0) ;; => 67305985
Raw
Repaste