X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fwrapper.lisp;h=eb567cd36ba5854f73daedceb8faffb901b1ba73;hb=43ed30b023d8ea5d0cd9c6a8928b4169aa0275ef;hp=49738e538462fbe085a3796a372f0354d1f33034;hpb=119d1c157e519573074720b7897a9fa918329ac5;p=sbcl.git diff --git a/src/pcl/wrapper.lisp b/src/pcl/wrapper.lisp index 49738e5..eb567cd 100644 --- a/src/pcl/wrapper.lisp +++ b/src/pcl/wrapper.lisp @@ -152,6 +152,9 @@ (remhash owrapper *previous-nwrappers*) (setf (gethash nwrapper *previous-nwrappers*) new-previous))) +;;; FIXME: This is not a good name: part of the constract here is that +;;; we return the valid wrapper, which is not obvious from the name +;;; (or the names of our callees.) (defun check-wrapper-validity (instance) (let* ((owrapper (wrapper-of instance)) (state (layout-invalid owrapper))) @@ -188,11 +191,11 @@ (when (invalid-wrapper-p (layout-of instance)) (check-wrapper-validity instance))) -(defun check-obsolete-instance/wrapper-of (instance) +(defun valid-wrapper-of (instance) (let ((wrapper (wrapper-of instance))) - (when (invalid-wrapper-p wrapper) - (check-wrapper-validity instance)) - wrapper)) + (if (invalid-wrapper-p wrapper) + (check-wrapper-validity instance) + wrapper))) ;;; NIL: means nothing so far, no actual arg info has NILs in the ;;; metatype.