original commit: e46543dea62ed245518382bb18f1024f1baff8e0
This commit is contained in:
Eli Barzilay 2004-06-17 12:01:53 +00:00
parent 1e3b6e860e
commit e24bea58de

View File

@ -645,6 +645,10 @@
(let ([cblock (malloc len type)])
(make-cvector cblock type len)))
(provide (rename cvector-args cvector))
(define (cvector-args type . args)
(list->cvector args type))
(define* (cvector-ref v i)
(if (and (integer? i) (<= 0 i (sub1 (cvector-length v))))
(ptr-ref (cvector-ptr v) (cvector-type v) i)
@ -688,8 +692,8 @@
[TAGname name])
#'(begin
(define-struct TAG (ptr length))
(provide TAG?)
(provide TAG-length (rename allocate-TAG make-TAG))
(provide TAG? TAG-length)
(provide (rename allocate-TAG make-TAG))
(define (allocate-TAG n . init)
(let* ([p (malloc n type)]
[v (make-TAG p n)])