(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))
(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))