;; Function arguments.
-(defun arguments-lists-equal-p (list-a list-b)
+(defun argument-lists-equal-p (list-a list-b)
"Return whether LIST-A and LIST-B match.
They must have the same number of arguments, and each argument must have
(every (lambda (arg-a arg-b)
(if (eq arg-a :ellipsis)
(eq arg-b :ellipsis)
- (c-type-equal-p (argument-type arg-a)
- (argument-type arg-b))))
+ (and (argumentp arg-a) (argumentp arg-b)
+ (c-type-equal-p (argument-type arg-a)
+ (argument-type arg-b)))))
list-a list-b)))
;; Class definition.
(defmethod c-type-equal-p and
((type-a c-function-type) (type-b c-function-type))
(and (c-type-equal-p (c-type-subtype type-a) (c-type-subtype type-b))
- (arguments-lists-equal-p (c-function-arguments type-a)
- (c-function-arguments type-b))))
+ (argument-lists-equal-p (c-function-arguments type-a)
+ (c-function-arguments type-b))))
;; C syntax output protocol.
~:>"
(c-type-subtype type)
(mapcar (lambda (arg)
- (if (eq arg :ellipsis)
- arg
+ (if (eq arg :ellipsis) arg
(list (argument-name arg) (argument-type arg))))
(c-function-arguments type))))
That is, with each argument name passed through
`commentify-argument-name'."
(mapcar (lambda (arg)
- (if (eq arg :ellipsis)
- arg
+ (if (eq arg :ellipsis) arg
(make-argument (commentify-argument-name (argument-name arg))
(argument-type arg))))
arguments))