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))