From 0b6f24e3b579ecbbc33fa1da68da1a2ba93fe70b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 27 Aug 2013 17:29:33 -0600 Subject: [PATCH] ffi/unsafe: unbreak `_list-struct` Broken by 0b1f96ab3d (specifically one of my changes to Tobias's patch). --- racket/collects/ffi/unsafe.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/racket/collects/ffi/unsafe.rkt b/racket/collects/ffi/unsafe.rkt index 1afec18cf0..2e731066c6 100644 --- a/racket/collects/ffi/unsafe.rkt +++ b/racket/collects/ffi/unsafe.rkt @@ -1316,10 +1316,10 @@ ;; Simple structs: call this with a list of types, and get a type that marshals ;; C structs to/from Scheme lists. (define* (_list-struct #:alignment [alignment #f] type . types) - (let ([stype (make-cstruct-type types #f alignment)] - [offsets (compute-offsets types alignment)] - [len (add1 (length types))] - [types (cons type types)]) + (let* ([types (cons type types)] + [stype (make-cstruct-type types #f alignment)] + [offsets (compute-offsets types alignment)] + [len (length types)]) (make-ctype stype (lambda (vals) (unless (list? vals)