Merged definition of byte-vector from S48 1.0.

This commit is contained in:
mainzelm 2003-01-07 10:30:37 +00:00
parent 8f95a44f54
commit 5da13e0f55
2 changed files with 17 additions and 1 deletions

View File

@ -141,7 +141,9 @@
byte-vector-length
byte-vector-ref
byte-vector-set!
make-byte-vector))
make-byte-vector
byte-vector))
; Same again, but with old names for compatibility.

View File

@ -187,6 +187,20 @@
(define (undefine-exported-binding name)
(undefine-shared-binding name #f))
; This really shouldn't be here, but I don't know where else to put it.
(define (byte-vector . l)
(let ((v (make-byte-vector (secret-length l 0) 0)))
(do ((i 0 (+ i 1))
(l l (cdr l)))
((eq? l '()) v)
(byte-vector-set! v i (car l)))))
(define (secret-length list length)
(if (eq? list '())
length
(secret-length (cdr list) (+ length 1))))
; Writing debugging messages.
(define (debug-message . stuff)