* Added bytevector-u8-ref and bytevector-s8-ref.

This commit is contained in:
Abdulaziz Ghuloum
2007-05-15 13:38:38 -04:00
parent db80ba43f6
commit a11fb060f2
4 changed files with 31 additions and 3 deletions
+8
View File
@@ -17,6 +17,14 @@
[not-bytevector? '#(2837 2398 239)]
[zero? (bytevector-length (make-bytevector 0))]
[(lambda (x) (= x 100)) (bytevector-length (make-bytevector 100 -30))]
[(lambda (x) (equal? x '(-127 129 -1 255)))
(let ([b1 (make-bytevector 16 -127)]
[b2 (make-bytevector 16 255)])
(list
(bytevector-s8-ref b1 0)
(bytevector-u8-ref b1 0)
(bytevector-s8-ref b2 0)
(bytevector-u8-ref b2 0)))]
))