- (list 'c-string
- :external-format (alien-c-string-type-external-format type)
- :element-type (alien-c-string-type-element-type type)))
+ (let* ((external-format (alien-c-string-type-external-format type))
+ (element-type (alien-c-string-type-element-type type))
+ (not-null (alien-c-string-type-not-null type))
+ (tail
+ (append (unless (eq :default external-format)
+ (list :external-format external-format))
+ (unless (eq 'character element-type)
+ (list :element-type element-type))
+ (when not-null
+ (list :not-null t)))))
+ (if tail
+ (cons 'c-string tail)
+ 'c-string)))