From d35c8cac36b678d272341fb53ed0bba5d691cbc7 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 8 Jul 2010 16:51:47 -0600 Subject: [PATCH] fix validation of module .zo exp-time content, and fix zo-marshal original commit: c7c8f56e111f1948242327e71b5c4ce8becd2922 --- collects/compiler/zo-marshal.rkt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index fba002eecb..0ff5989dfb 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -479,7 +479,18 @@ [l (cons (lookup-req 1) l)] ; et-requires [l (cons (lookup-req 0) l)] ; requires [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 append (map (lambda (l)