;;AUTOLOAD: *:refcount
;;AUTODOC: *:refcount "returns the reference count of an object"
;;INTERNAL: (*:refcount obj) returns the refcount of an object
;;a refcount is at least 2 since the call list points to it and the stack, 
;;too...

(defunq ref (ref:adr &aux
    (ref:ptr-to (C:& (eval ref:adr)))
  )
  (/ (C:*-int (+ C:ptr-size ref:ptr-to)) 2)
)
