[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: Reuse core vector-fill! in (scheme base)
From: |
Daniel Llorens |
Subject: |
[Guile-commits] 03/03: Reuse core vector-fill! in (scheme base) |
Date: |
Thu, 5 Aug 2021 14:03:37 -0400 (EDT) |
lloda pushed a commit to branch wip-vector-cleanup-2
in repository guile.
commit f7581a8509c8b7487bf355d956fc6407e22de76b
Author: Daniel Llorens <lloda@sarc.name>
AuthorDate: Thu Aug 5 20:01:22 2021 +0200
Reuse core vector-fill! in (scheme base)
module/scheme/base.scm: As stated.
---
module/scheme/base.scm | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/module/scheme/base.scm b/module/scheme/base.scm
index fcb1f49..c57bdf1 100644
--- a/module/scheme/base.scm
+++ b/module/scheme/base.scm
@@ -57,7 +57,6 @@
string->vector vector->string
(r7:string->utf8 . string->utf8)
(r7:vector->list . vector->list)
- (r7:vector-fill! . vector-fill!)
vector-copy! vector-append vector-for-each vector-map
(r7:bytevector-copy . bytevector-copy)
(r7:bytevector-copy! . bytevector-copy!)
@@ -115,7 +114,7 @@
(char-ready? . u8-ready?)
unless
unquote unquote-splicing values
- vector vector-copy
+ vector vector-copy vector-fill!
vector-length vector-ref vector-set! vector?
when with-exception-handler write-char
zero?))
@@ -502,15 +501,6 @@ defaults to 0 and SEND defaults to the length of SOURCE."
((v start #:optional (end (vector-length v)))
(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 mlen (- end start))
(define out (make-bytevector mlen))