mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
Reuse core vector-fill! in (scheme base)
module/scheme/base.scm: As stated.
This commit is contained in:
parent
a34c762de0
commit
091f5062cb
1 changed files with 1 additions and 11 deletions
|
@ -57,7 +57,6 @@
|
||||||
string->vector vector->string
|
string->vector vector->string
|
||||||
(r7:string->utf8 . string->utf8)
|
(r7:string->utf8 . string->utf8)
|
||||||
(r7:vector->list . vector->list)
|
(r7:vector->list . vector->list)
|
||||||
(r7:vector-fill! . vector-fill!)
|
|
||||||
vector-copy! vector-append vector-for-each vector-map
|
vector-copy! vector-append vector-for-each vector-map
|
||||||
(r7:bytevector-copy . bytevector-copy)
|
(r7:bytevector-copy . bytevector-copy)
|
||||||
(r7:bytevector-copy! . bytevector-copy!)
|
(r7:bytevector-copy! . bytevector-copy!)
|
||||||
|
@ -115,7 +114,7 @@
|
||||||
(char-ready? . u8-ready?)
|
(char-ready? . u8-ready?)
|
||||||
unless
|
unless
|
||||||
unquote unquote-splicing values
|
unquote unquote-splicing values
|
||||||
vector vector-copy
|
vector vector-copy vector-fill!
|
||||||
vector-length vector-ref vector-set! vector?
|
vector-length vector-ref vector-set! vector?
|
||||||
when with-exception-handler write-char
|
when with-exception-handler write-char
|
||||||
zero?))
|
zero?))
|
||||||
|
@ -502,15 +501,6 @@ defaults to 0 and SEND defaults to the length of SOURCE."
|
||||||
((v start #:optional (end (vector-length v)))
|
((v start #:optional (end (vector-length v)))
|
||||||
(vector->string (vector-copy v start end)))))
|
(vector->string (vector-copy v start end)))))
|
||||||
|
|
||||||
(define r7:vector-fill!
|
|
||||||
(case-lambda*
|
|
||||||
((vec fill) (vector-fill! vec fill))
|
|
||||||
((vec fill start #:optional (end (vector-length vec)))
|
|
||||||
(let lp ((r start))
|
|
||||||
(unless (= r end)
|
|
||||||
(vector-set! vec r fill)
|
|
||||||
(lp (+ r 1)))))))
|
|
||||||
|
|
||||||
(define (%subbytevector bv start end)
|
(define (%subbytevector bv start end)
|
||||||
(define mlen (- end start))
|
(define mlen (- end start))
|
||||||
(define out (make-bytevector mlen))
|
(define out (make-bytevector mlen))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue