-(defmethod initialize-instance :around ((object %object) &rest initargs)
- (declare (ignore initargs))
- (call-next-method)
- ;; Add a temorary reference which will be removed when the object is
- ;; sinked
- (funcall (reference-function '%object) (foreign-location object))
- (%object-sink object))
-
-(defbinding %object-sink () nil
- (object %object))
+#?-(pkg-exists-p "glib-2.0" :atleast-version "2.10.0")
+(progn
+ (defmethod initialize-instance :around ((object %object) &rest initargs)
+ (declare (ignore initargs))
+ (call-next-method)
+ ;; Add a temorary reference which will be removed when the object is
+ ;; sinked
+ (funcall (reference-function '%object) (foreign-location object))
+ (%object-sink object))
+
+ (defbinding %object-sink () nil
+ (object %object)))