Discussion:
[Larceny-users] PortIO Bug In get-bytevector-n(!)
Ray Racine
2008-02-02 16:37:19 UTC
Permalink
By my reading of R6RN Library, Section 8.2.8, Binary Input, both of the
expressions below should return the eof-object, but do not.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; returns 0, when it should return eof-object
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(get-bytevector-n! (open-bytevector-input-port (make-bytevector 0))
(make-bytevector 32)
0 16)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; returns an 0 length bytevector, when it should return eof-object?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(get-bytevector-n (open-bytevector-input-port (make-bytevector 0)) 16)

Thanks,

Ray

Loading...