From 17cdb9eb3b43021b6b1380b91b12caef837e383b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 10 Sep 2010 08:06:38 -0600 Subject: [PATCH] move #:alignment option for `define-cstruct' to end to make it consistent with options for `struct' and `define-struct' --- collects/ffi/unsafe.rkt | 4 ++-- collects/scribblings/foreign/types.scrbl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/ffi/unsafe.rkt b/collects/ffi/unsafe.rkt index 141f766e8c..451b409da6 100644 --- a/collects/ffi/unsafe.rkt +++ b/collects/ffi/unsafe.rkt @@ -1354,7 +1354,7 @@ (and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...))) (make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'#f)] - [(_ _TYPE #:alignment alignment-expr ([slot slot-type] ...)) + [(_ _TYPE ([slot slot-type] ...) #:alignment alignment-expr) (and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...))) (make-syntax #'_TYPE #f #'(slot ...) #'(slot-type ...) #'alignment-expr)] @@ -1362,7 +1362,7 @@ (and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...))) (with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)]) (make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'#f))] - [(_ (_TYPE _SUPER) #:alignment alignment-expr ([slot slot-type] ...)) + [(_ (_TYPE _SUPER) ([slot slot-type] ...) #:alignment alignment-expr) (and (_-identifier? #'_TYPE stx) (identifiers? #'(slot ...))) (with-syntax ([super (datum->syntax #'_TYPE 'super #'_TYPE)]) (make-syntax #'_TYPE #t #'(super slot ...) #'(_SUPER slot-type ...) #'alignment-expr))])) diff --git a/collects/scribblings/foreign/types.scrbl b/collects/scribblings/foreign/types.scrbl index 612df43b29..58df957a94 100644 --- a/collects/scribblings/foreign/types.scrbl +++ b/collects/scribblings/foreign/types.scrbl @@ -776,7 +776,7 @@ the allocated space, so it is inefficient. Use @scheme[define-cstruct] below for a more efficient approach.} -@defform/subs[(define-cstruct id/sup alignment ([field-id type-expr] ...)) +@defform/subs[(define-cstruct id/sup ([field-id type-expr] ...) alignment) [(id/sup _id (_id super-id)) (alignment code:blank