X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/4c5028359a3890aee32eac0fe9d69b363296fc7c..a115157e984096f3ba70c0d0ded956db8d40870d:/glib/gobject.lisp diff --git a/glib/gobject.lisp b/glib/gobject.lisp index 38342e4..b9b2b4e 100644 --- a/glib/gobject.lisp +++ b/glib/gobject.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: gobject.lisp,v 1.44 2006/02/06 11:34:05 espen Exp $ +;; $Id: gobject.lisp,v 1.45 2006/02/08 22:10:47 espen Exp $ (in-package "GLIB") @@ -212,7 +212,7 @@ (defclass gobject (ginstance) #+debug-ref-counting (defmethod print-object ((instance gobject) stream) (print-unreadable-object (instance stream :type t :identity nil) - (if (slot-boundp instance 'location) + (if (proxy-valid-p instance) (format stream "at 0x~X (~D)" (sap-int (foreign-location instance)) (ref-count instance)) (write-string "at \"unbound\"" stream)))) @@ -251,7 +251,7 @@ (defmethod initialize-instance :around ((object gobject) &rest initargs) (defmethod initialize-instance ((object gobject) &rest initargs) - (unless (slot-boundp object 'location) + (unless (proxy-valid-p object) ;; Extract initargs which we should pass directly to the GObject ;; constructor (let* ((slotds (class-slots (class-of object))) @@ -284,7 +284,7 @@ (defmethod initialize-instance ((object gobject) &rest initargs) (gvalue-init (sap+ tmp string-size) type value)) (unwind-protect (setf - (slot-value object 'location) + (foreign-location object) (%gobject-newv (type-number-of object) (length args) params)) (loop repeat (length args) @@ -293,7 +293,7 @@ (defmethod initialize-instance ((object gobject) &rest initargs) (gvalue-unset (sap+ tmp string-size))) (deallocate-memory params))) (setf - (slot-value object 'location) + (foreign-location object) (%gobject-new (type-number-of object)))))) (apply #'call-next-method object initargs))