* Added bytevector-length

This commit is contained in:
Abdulaziz Ghuloum 2007-05-15 13:17:17 -04:00
parent 49d254c89e
commit db80ba43f6
4 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -1922,6 +1922,7 @@
void base-rtd $unbound-object? code? $forward-ptr? bwp-object? void base-rtd $unbound-object? code? $forward-ptr? bwp-object?
pointer-value top-level-value car cdr list* list $record pointer-value top-level-value car cdr list* list $record
port? input-port? output-port? $bytevector-set! port? input-port? output-port? $bytevector-set!
$bytevector-length
$make-bytevector $bytevector-ref bytevector? $make-bytevector $bytevector-ref bytevector?
$make-port/input $make-port/output $make-port/both $make-port/input $make-port/output $make-port/both
$port-handler $port-handler
@ -3662,6 +3663,8 @@
[($cdr) (indirect-ref arg* (fx- disp-cdr pair-tag) ac)] [($cdr) (indirect-ref arg* (fx- disp-cdr pair-tag) ac)]
[($vector-length) [($vector-length)
(indirect-ref arg* (fx- disp-vector-length vector-tag) ac)] (indirect-ref arg* (fx- disp-vector-length vector-tag) ac)]
[($bytevector-length)
(indirect-ref arg* (fx- disp-bytevector-length bytevector-tag) ac)]
[($string-length) [($string-length)
(indirect-ref arg* (fx- disp-string-length string-tag) ac)] (indirect-ref arg* (fx- disp-string-length string-tag) ac)]
[($symbol-string) [($symbol-string)

View File

@ -272,6 +272,7 @@
[list->vector i r] [list->vector i r]
[vector->list i r] [vector->list i r]
[make-bytevector i] [make-bytevector i]
[bytevector-length i]
[for-each i r] [for-each i r]
[map i r] [map i r]
@ -479,6 +480,7 @@
[$make-bytevector $bytes] [$make-bytevector $bytes]
[$bytevector-length $bytes] [$bytevector-length $bytes]
[$bytevector-ref $bytes] [$bytevector-ref $bytes]
[$bytevector-s8-ref $bytes]
[$bytevector-set! $bytes] [$bytevector-set! $bytes]

View File

@ -15,6 +15,9 @@
[not-bytevector? (current-output-port)] [not-bytevector? (current-output-port)]
[not-bytevector? (current-input-port)] [not-bytevector? (current-input-port)]
[not-bytevector? '#(2837 2398 239)] [not-bytevector? '#(2837 2398 239)]
[zero? (bytevector-length (make-bytevector 0))]
[(lambda (x) (= x 100)) (bytevector-length (make-bytevector 100 -30))]
)) ))