[alexandria.git] updated branch master: 268b6da declare LAST ignorable in PROPER-LIST-LENGTH and friends

Nikodemus Siivola nsiivola at common-lisp.net
Sat Oct 29 22:08:59 UTC 2011


The branch master has been updated:
       via  268b6da4603d156cd22fedbfd5b8c5e67d2a394e (commit)
      from  0e6be9262e000c8748942379d9c18778b393dd99 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 268b6da4603d156cd22fedbfd5b8c5e67d2a394e
Author: Antony <lisp.linux at gmail.com>
Date:   Sun Oct 30 01:06:25 2011 +0300

    declare LAST ignorable in PROPER-LIST-LENGTH and friends
    
      Clozure CL at least considers it currently unused and
      signals a style warning.

-----------------------------------------------------------------------

Summary of changes:
 lists.lisp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lists.lisp b/lists.lisp
index 6367bc7..00b42fa 100644
--- a/lists.lisp
+++ b/lists.lisp
@@ -198,7 +198,8 @@ designator of the expected type in a TYPE-ERROR."
                      (slow (cons (car list) (cdr list)) (cdr slow))
                      ,@(when step (list step)))
                     (nil)
-                  (declare (dynamic-extent slow) ,@(when declare (list declare)))
+                  (declare (dynamic-extent slow) ,@(when declare (list declare))
+                           (ignorable last))
                   (when (safe-endp fast)
                     (return ,ret1))
                   (when (safe-endp (cdr fast))
@@ -211,10 +212,10 @@ designator of the expected type in a TYPE-ERROR."
     ;; KLUDGE: Most implementations don't actually support lists with bignum
     ;; elements -- and this is WAY faster on most implementations then declaring
     ;; N to be an UNSIGNED-BYTE.
-    (fixnum n) 
+    (fixnum n)
     (1- n)
     n)
-  
+
   (def lastcar (list)
       "Returns the last element of LIST. Signals a type-error if LIST is not a
 proper list."
@@ -222,7 +223,7 @@ proper list."
     nil
     (cadr last)
     (car fast))
-  
+
   (def (setf lastcar) (object list)
       "Sets the last element of LIST. Signals a type-error if LIST is not a proper
 list."
-- 
Alexandria hooks/post-receive




More information about the alexandria-cvs mailing list