X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/c23cc4868df7b573bb24f1c29e7d6ad61a10c092..bdf1567aa37a86469f0825e0ccc87d34039b7c4b:/glib/proxy.lisp?ds=sidebyside diff --git a/glib/proxy.lisp b/glib/proxy.lisp index 2f0bf75..a114325 100644 --- a/glib/proxy.lisp +++ b/glib/proxy.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: proxy.lisp,v 1.33 2006/02/15 09:45:41 espen Exp $ +;; $Id: proxy.lisp,v 1.35 2006/02/19 19:23:23 espen Exp $ (in-package "GLIB") @@ -205,6 +205,10 @@ (defmethod compute-effective-slot-definition-initargs ((class virtual-slots-clas (let ((boundp (most-specific-slot-value direct-slotds 'boundp))) (unless (eq boundp *unbound-marker*) (setf (getf initargs :boundp) boundp))) + ;; Need this to prevent type expansion in SBCL >= 0.9.8 + (let ((type (most-specific-slot-value direct-slotds 'type))) + (unless (eq type *unbound-marker*) + (setf (getf initargs :type) type))) (nconc initargs (call-next-method)))) (direct-special-slot-definition (append '(:special t) (call-next-method))) @@ -656,6 +660,13 @@ (defmethod reader-function ((class struct-class) &rest args) (unless (null-pointer-p instance) (ensure-proxy-instance class instance :weak t))))) +(defmethod callback-from-alien-form (form (class struct-class) &rest args) + `(ensure-proxy-instance ',(class-name class) ,form :weak t)) + +(defmethod callback-cleanup-form (form (class struct-class) &rest args) + (declare (ignore class)) + `(invalidate-instance ,form)) + ;;; Pseudo type for structs which are inlined in other objects