ffi/unsafe: unbreak _list-struct

Broken by 0b1f96ab3d (specifically one of my changes to
Tobias's patch).
This commit is contained in:
Matthew Flatt 2013-08-27 17:29:33 -06:00
parent 3d91b6b77f
commit 0b6f24e3b5

View File

@ -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)