-(defmethod pprint-c-type ((type c-function-type) stream kernel)
- (pprint-c-type (c-type-subtype type) stream
- (lambda (stream prio spacep)
- (maybe-in-parens (stream (> prio 2))
- (when spacep (c-type-space stream))
- (funcall kernel stream 2 nil)
- (pprint-indent :block 4 stream)
- (pprint-logical-block
- (stream nil :prefix "(" :suffix ")")
- (let ((firstp t))
- (dolist (arg (c-function-arguments type))
- (if firstp
- (setf firstp nil)
- (format stream ", ~_"))
- (if (eq arg :ellipsis)
- (write-string "..." stream)
- (pprint-c-type (argument-type arg)
- stream
- (argument-name arg))))))))))
+(let ((void-arglist (list (make-argument nil c-type-void))))
+ (defmethod pprint-c-type ((type c-function-type) stream kernel)
+ (pprint-c-type (c-type-subtype type) stream
+ (lambda (stream prio spacep)
+ (maybe-in-parens (stream (> prio 2))
+ (when spacep (c-type-space stream))
+ (funcall kernel stream 2 nil)
+ (pprint-indent :block 4 stream)
+ (pprint-logical-block
+ (stream nil :prefix "(" :suffix ")")
+ (let ((firstp t))
+ (dolist (arg (or (c-function-arguments type)
+ void-arglist))
+ (if firstp
+ (setf firstp nil)
+ (format stream ", ~_"))
+ (if (eq arg :ellipsis)
+ (write-string "..." stream)
+ (pprint-c-type (argument-type arg)
+ stream
+ (argument-name arg)))))))))))