From ieslick at common-lisp.net Tue Jul 10 21:03:23 2007 From: ieslick at common-lisp.net (ieslick) Date: Tue, 10 Jul 2007 17:03:23 -0400 (EDT) Subject: [elephant-cvs] CVS elephant/src/elephant Message-ID: <20070710210323.6202243218@common-lisp.net> Update of /project/elephant/cvsroot/elephant/src/elephant In directory clnet:/tmp/cvs-serv16487 Modified Files: collections.lisp Log Message: Compare dissimilar types in indices --- /project/elephant/cvsroot/elephant/src/elephant/collections.lisp 2007/05/07 18:38:29 1.32 +++ /project/elephant/cvsroot/elephant/src/elephant/collections.lisp 2007/07/10 21:03:23 1.33 @@ -394,11 +394,16 @@ ;; ======================================= (defun lisp-compare<= (a b) - (etypecase a - (number (<= a b)) - (string (string<= a b)) - (persistent (<= (oid a) (oid b))) - (symbol (string<= (symbol-name a) (symbol-name b))))) + (let ((ta (type-of a)) + (tb (type-of b))) + (if (equal ta tb) + (typecase a + (number (<= a b)) + (persistent (<= (oid a) (oid b))) + (string (string<= a b)) + (symbol (string<= (symbol-name a) (symbol-name b))) + (pathname (string<= (namestring a) (namestring b))) + (t nil))))) (defun lisp-compare-equal (a b) (equal a b))