From 3331fe906376fcc9f70759397f9a3be393120128 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Sat, 19 Oct 2002 13:10:23 +0000
Subject: [PATCH] Got rid of potential problem with LIST being called with >=
 CALL-ARGUMENTS-LIMIT args.

---
 ansi-tests/ansi-aux.lsp            | 9 +++++++++
 ansi-tests/multiple-value-setq.lsp | 5 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ansi-tests/ansi-aux.lsp b/ansi-tests/ansi-aux.lsp
index 1faf65db..70bb7f27 100644
--- a/ansi-tests/ansi-aux.lsp
+++ b/ansi-tests/ansi-aux.lsp
@@ -235,6 +235,15 @@ the condition to go uncaught if it cannot be classified."
 	       (rotatef (elt seq r) (elt seq (1- i))))))
   seq)
 
+(defun make-list-expr (args)
+  "Build an expression for computing (LIST . args), but that evades
+   CALL-ARGUMENTS-LIMIT."
+  (if (cddddr args)
+      (list 'list*
+	    (first args) (second args) (third args) (fourth args)
+	    (make-list-expr (cddddr args)))
+    (cons 'list args)))  
+
 (defparameter +standard-chars+
   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()_+|\\=-`{}[]:\";'<>?,./ 
 ")
diff --git a/ansi-tests/multiple-value-setq.lsp b/ansi-tests/multiple-value-setq.lsp
index 70b3c8b7..a4d44467 100644
--- a/ansi-tests/multiple-value-setq.lsp
+++ b/ansi-tests/multiple-value-setq.lsp
@@ -101,8 +101,9 @@
        `(let ,vars
 	  (and (eql (multiple-value-setq ,vars (values-list (quote ,result)))
 		    ,(car result))
-	       (equal (list ,@vars) (quote ,result)))))
+	       (equal ,(make-list-expr vars)
+		      (quote ,result)))))
      unless (eval form)
      collect (list i form)))
   nil)
-|#
\ No newline at end of file
+|#
-- 
GitLab