[armedbear-cvs] r12145 - trunk/abcl/src/org/armedbear/lisp

Ville Voutilainen vvoutilainen at common-lisp.net
Mon Sep 14 15:26:05 UTC 2009


Author: vvoutilainen
Date: Mon Sep 14 11:26:02 2009
New Revision: 12145

Log:
Don't traverse the lambda list twice when checking
method args.


Modified:
   trunk/abcl/src/org/armedbear/lisp/clos.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Mon Sep 14 11:26:02 2009
@@ -1995,9 +1995,12 @@
   (when (symbolp initarg)
     (dolist (method methods nil)
       (let ((valid-initargs (method-lambda-list method)))
-	(when (or
-	       (find "&ALLOW-OTHER-KEYS" valid-initargs :test #'string=)
-	       (find (symbol-value initarg) valid-initargs :test #'string=))
+	(when (find (symbol-value initarg) valid-initargs 
+		     :test #'(lambda (a b)
+			       (or
+				(string= a b)
+				(string= b "&ALLOW-OTHER-KEYS"))))
+
 	  (return t))))))
 
 (defun valid-initarg-p (initarg slots)




More information about the armedbear-cvs mailing list