1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 13:20:26 +02:00

Do not install read-hash procedure for reading arrays, this is done in

libguile now.
This commit is contained in:
Marius Vollmer 2004-10-29 14:47:15 +00:00
parent eb42ff2564
commit 81975bee33

View file

@ -36,19 +36,19 @@
(map (lambda (ind) (if (number? ind) (list 0 (+ -1 ind)) ind)) (map (lambda (ind) (if (number? ind) (list 0 (+ -1 ind)) ind))
(array-dimensions a))) (array-dimensions a)))
(let ((make-array-proc (lambda (template) ; (let ((make-array-proc (lambda (template)
(lambda (c port) ; (lambda (c port)
(read:uniform-vector template port))))) ; (read:uniform-vector template port)))))
(for-each (lambda (char template) ; (for-each (lambda (char template)
(read-hash-extend char ; (read-hash-extend char
(make-array-proc template))) ; (make-array-proc template)))
'(#\a #\u #\e #\s #\i #\c #\y #\h #\l) ; '(#\a #\u #\e #\s #\i #\c #\y #\h #\l)
'(#\a 1 -1 1.0 1/3 0+i #\nul s l))) ; '(#\a 1 -1 1.0 1/3 0+i #\nul s l)))
(let ((array-proc (lambda (c port) ; (let ((array-proc (lambda (c port)
(read:array c port)))) ; (read:array c port))))
(for-each (lambda (char) (read-hash-extend char array-proc)) ; (for-each (lambda (char) (read-hash-extend char array-proc))
'(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9))) ; '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9)))
(define (read:array digit port) (define (read:array digit port)
(define chr0 (char->integer #\0)) (define chr0 (char->integer #\0))