fix validation of module .zo exp-time content, and fix zo-marshal

original commit: c7c8f56e11
This commit is contained in:
Matthew Flatt 2010-07-08 16:51:47 -06:00
parent 2cd7824462
commit d35c8cac36

View File

@ -479,7 +479,18 @@
[l (cons (lookup-req 1) l)] ; et-requires [l (cons (lookup-req 1) l)] ; et-requires
[l (cons (lookup-req 0) l)] ; requires [l (cons (lookup-req 0) l)] ; requires
[l (cons (list->vector body) l)] [l (cons (list->vector body) l)]
[l (cons (list->vector syntax-body) l)] [l (cons (list->vector
(for/list ([i (in-list syntax-body)])
(define (maybe-one l) ;; a single symbol is ok
(if (and (pair? l) (null? (cdr l)))
(car l)
l))
(match i
[(struct def-syntaxes (ids rhs prefix max-let-depth))
(vector (maybe-one ids) rhs max-let-depth prefix #f)]
[(struct def-for-syntax (ids rhs prefix max-let-depth))
(vector (maybe-one ids) rhs max-let-depth prefix #t)])))
l)]
[l (append (apply [l (append (apply
append append
(map (lambda (l) (map (lambda (l)