From f5d75f560ab705227f421dcffe2504dd1286accc Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 30 Aug 2015 10:58:38 +0100 Subject: [PATCH] src/method-proto.lisp: Fix varargs trampoline method construction. The extra `ap' argument comes at the front, not the end. Trim the final ellipsis instead of (wrongly) trying to convert it. --- src/method-proto.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/method-proto.lisp b/src/method-proto.lisp index 51bd1a3..17db6e9 100644 --- a/src/method-proto.lisp +++ b/src/method-proto.lisp @@ -311,12 +311,12 @@ (let* ((message (codegen-message codegen)) (message-type (sod-message-type message)) (return-type (c-type-subtype message-type)) - (arguments (mapcar (lambda (arg) - (if (eq (argument-name arg) *sod-ap*) - (make-argument *sod-master-ap* - (c-type va-list)) - arg)) - (sod-message-no-varargs-tail message)))) + (raw-args (sod-message-argument-tail message)) + (arguments (if (varargs-message-p message) + (cons (make-argument *sod-master-ap* + (c-type va-list)) + (butlast raw-args)) + raw-args))) (codegen-push codegen) (ensure-ilayout-var codegen super) (funcall body (codegen-target codegen)) -- 2.11.0