<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div>One trick I have used once is to just inspect the unbound value that is used by the CLOS implementation. You can do this in a portable way, like this:
</div><div><br></div><div>(defclass test ()</div><div> (test-slot))</div><div><br></div><div>(defvar +unbound-slot-value+</div><div> (let ((test (make-instance 'test)))</div><div> (standard-instance-access test</div>
<div> (slot-definition-location</div><div> (find 'test-slot (class-slots (find-class 'test))</div><div> :key #'slot-definition-name)))))</div><div><br></div><div>(setf (find-class 'test) nil)</div>
<div><br></div><div>This code assumes that the value for unbound slots remains constant for the lifetime of an image (but I can't imagine why that would not be the case).</div></div></div></blockquote><div><br>fyi, clisp has all kind of trouble with this. seems like even variable reads are being checked against this marker (!?). i've managed to get a little further by capturing the value into a lambda and going through a funcall, but playing with this can bring down clisp and/or slime.
<br><br></div></div>-- <br>- attila<br><br>"- The truth is that I've been too considerate, and so became unintentionally cruel...<br> - I understand.<br> - No, you don't understand! We don't speak the same language!"
<br>(Ingmar Bergman - Smultronstället)