[movitz-cvs] CVS update: movitz/losp/muerte/equalp.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Mon Mar 29 14:56:26 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv20814

Modified Files:
	equalp.lisp 
Log Message:
Make equalp behave for structure-objects.

Date: Mon Mar 29 09:56:26 2004
Author: ffjeld

Index: movitz/losp/muerte/equalp.lisp
diff -u movitz/losp/muerte/equalp.lisp:1.2 movitz/losp/muerte/equalp.lisp:1.3
--- movitz/losp/muerte/equalp.lisp:1.2	Mon Jan 19 06:23:46 2004
+++ movitz/losp/muerte/equalp.lisp	Mon Mar 29 09:56:26 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Tue Mar 13 17:09:08 2001
 ;;;;                
-;;;; $Id: equalp.lisp,v 1.2 2004/01/19 11:23:46 ffjeld Exp $
+;;;; $Id: equalp.lisp,v 1.3 2004/03/29 14:56:26 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -57,4 +57,10 @@
 		     ((= i length) t)
 		   (unless (equalp (aref x i) (aref y i))
 		     (return nil)))))))
+    (structure-object
+     (and (eq (class-of x) (class-of y))
+	  (dotimes (i (structure-object-length x) t)
+	    (unless (equalp (structure-ref x i)
+			    (structure-ref y i))
+	      (return nil)))))
     (t (equal x y))))





More information about the Movitz-cvs mailing list