From: Dmitry Kalyanov Date: Wed, 5 Aug 2009 22:17:44 +0000 (+0400) Subject: glib: fixed free-translated-object for variant cstruct X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4ef6a090655cb5043a76c2afc9b15467606b7028;p=cl-gtk2.git glib: fixed free-translated-object for variant cstruct --- diff --git a/glib/gobject.boxed.lisp b/glib/gobject.boxed.lisp index fe84adb..5afba92 100644 --- a/glib/gobject.boxed.lisp +++ b/glib/gobject.boxed.lisp @@ -444,12 +444,13 @@ (when proxy (let ((type (g-boxed-foreign-info foreign-type))) (multiple-value-bind (actual-struct cstruct-description) (decide-proxy-type type native) - (unless (eq (type-of proxy) (cstruct-description-name actual-struct)) + (unless (eq (type-of proxy) actual-struct) (restart-case (error "Expected type of boxed variant structure ~A and actual type ~A do not match" (type-of proxy) actual-struct) (skip-parsing-values () (return-from free-translated-object)))) - (copy-slots-to-proxy proxy native cstruct-description))))) + (copy-slots-to-proxy proxy native cstruct-description) + (boxed-free-fn type native))))) (defmethod translate-from-foreign (native (foreign-type boxed-variant-cstruct-foreign-type)) (unless (null-pointer-p native)