From: Dmitry Kalyanov Date: Sat, 14 Feb 2009 07:21:54 +0000 (+0300) Subject: Fixing ownership setting of g-boxed-refs X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c516e3bb9ea37479ffd9005845844b7be596e295;p=cl-gtk2.git Fixing ownership setting of g-boxed-refs --- diff --git a/glib/gobject.foreign-gboxed.lisp b/glib/gobject.foreign-gboxed.lisp index b218397..00aff15 100644 --- a/glib/gobject.foreign-gboxed.lisp +++ b/glib/gobject.foreign-gboxed.lisp @@ -228,7 +228,8 @@ (let ((address (pointer-address (pointer object)))) (setf (gethash address *known-boxed-refs*) object) (setf (gethash address *boxed-ref-count*) 1) - (setf (gethash address *boxed-ref-owner*) :foreign)) + (setf (gethash address *boxed-ref-owner*) + (gethash address *boxed-ref-owner* :foreign))) (debugf "setting g-boxed-ref-count of ~A to 1~%" (pointer object)) (let ((p (pointer object)) (type (type-of object)) @@ -292,7 +293,7 @@ (defmethod initialize-instance :before ((object ,name) &key pointer) (unless (or pointer (slot-boundp object 'pointer)) (setf (pointer object) (,alloc-fn) - (gethash (pointer-address pointer) *boxed-ref-owner*) :lisp))) + (gethash (pointer-address (pointer object)) *boxed-ref-owner*) :lisp))) (setf (get ',name 'free-function) ',free-fn) (eval-when (:compile-toplevel :load-toplevel :execute) (setf (get ',name 'is-g-boxed-ref) t))