chiark / gitweb /
src/: Argument lists don't only contain `argument' objects.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Sep 2015 11:23:12 +0000 (12:23 +0100)
They can also contain `:ellipsis' markers.

src/c-types-impl.lisp
src/class-make-impl.lisp

index be2c055524ddbf300680221d795904f65531b3d3..b4f02e1fc0178ade21d74caa6dc06ccf9d0fd274 100644 (file)
@@ -431,6 +431,7 @@ (defun make-function-type (subtype arguments)
   (make-instance 'c-function-type :subtype subtype
                 :arguments (if (and arguments
                                     (null (cdr arguments))
+                                    (not (eq (car arguments) :ellipsis))
                                     (eq (argument-type (car arguments))
                                         c-type-void))
                                nil
index 28c1958ef81741eee965e5d3c8d8927a363b328a..32b2e61e22df7930e1a9b8cd35b4c416108fd3f7 100644 (file)
@@ -214,7 +214,8 @@ (defmethod shared-initialize :after
   (with-slots (body type) method
     (unless (or (not body)
                (every (lambda (arg)
-                        (or (argument-name arg)
+                        (or (eq arg :ellipsis)
+                            (argument-name arg)
                             (eq (argument-type arg) (c-type void))))
                       (c-function-arguments type)))
       (error "Abstract declarators not permitted in method definitions")))