Add refcount for found g-boxed-ref's
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Wed, 25 Feb 2009 22:20:16 +0000 (01:20 +0300)
committerDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Wed, 25 Feb 2009 22:20:16 +0000 (01:20 +0300)
glib/gobject.foreign-gboxed.lisp

index 7f83a09..994e759 100644 (file)
     (with-recursive-lock-held (*g-boxed-gc-lock*)
      (or (aprog1 (gethash (pointer-address pointer) *known-boxed-refs*)
            (when it (debugf "Boxed-ref for ~A is found (~A)~%" pointer it))
+           (when it (incf (gethash (pointer-address pointer) *boxed-ref-count*)))
            it)
          (aprog1 (make-instance name :pointer pointer)
            (setf (gethash (pointer-address pointer) *boxed-ref-owner*) (g-boxed-ref-owner type))