mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
fix #y back-compat shim
* module/ice-9/deprecated.scm (#\y): #y was in fact a syntax for s8vectors, not bitvectors. Fix.
This commit is contained in:
parent
0142d376b8
commit
5cc987760b
1 changed files with 3 additions and 10 deletions
|
@ -250,18 +250,11 @@
|
|||
#\y
|
||||
(lambda (c port)
|
||||
(issue-deprecation-warning
|
||||
"The `#y' bitvector syntax is deprecated. Use `#*' instead.")
|
||||
"The `#y' bytevector syntax is deprecated. Use `#s8' instead.")
|
||||
(let ((x (read port)))
|
||||
(cond
|
||||
((list? x)
|
||||
(list->bitvector
|
||||
(map (lambda (x)
|
||||
(cond ((zero? x) #f)
|
||||
((eqv? x 1) #t)
|
||||
(else (error "invalid #y element" x))))
|
||||
x)))
|
||||
(else
|
||||
(error "#y needs to be followed by a list" x))))))
|
||||
((list? x) (list->s8vector x))
|
||||
(else (error "#y needs to be followed by a list" x))))))
|
||||
|
||||
(define (unmemoize-expr . args)
|
||||
(issue-deprecation-warning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue