1
Fork 0
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:
Andy Wingo 2010-08-29 21:01:54 -07:00
parent 0142d376b8
commit 5cc987760b

View file

@ -250,18 +250,11 @@
#\y #\y
(lambda (c port) (lambda (c port)
(issue-deprecation-warning (issue-deprecation-warning
"The `#y' bitvector syntax is deprecated. Use `#*' instead.") "The `#y' bytevector syntax is deprecated. Use `#s8' instead.")
(let ((x (read port))) (let ((x (read port)))
(cond (cond
((list? x) ((list? x) (list->s8vector x))
(list->bitvector (else (error "#y needs to be followed by a list" x))))))
(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))))))
(define (unmemoize-expr . args) (define (unmemoize-expr . args)
(issue-deprecation-warning (issue-deprecation-warning