|
Re: [Sbcl-help] Subtleties of EQ
From: Thomas F. Burdick <tburdick@gm...> - 2009-01-28 10:18
|
2009/1/28 Leslie P. Polzer <sky@...>:
>
> I have two CLOS objects that seem to be pretty identical
> -- same print output and same address.
>
> Yet EQ returns NIL when they are compared.
>
> How is this possible?
It shouldn't be. Do you have a reproducible example?
You may also try using the following sanity-checking function:
(defun sanity-check (obj1 obj2)
(declare (optimize (speed 1) (safety 1) (debug 1)))
(let ((addr1 (sb-kernel:get-lisp-obj-address obj1))
(addr2 (sb-kernel:get-lisp-obj-address obj2)))
(format t "~&obj1 is at ~X~%obj2 is at ~X~%(eq obj1 obj2) => ~S~%"
addr1 addr2 (eq obj1 obj2))))
|
| Thread | Author | Date | |
|---|---|---|---|
| [Sbcl-help] Subtleties of EQ | Leslie P. Polzer <sky@vi...> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|