+(defbinding (gvalue-p "g_type_check_value") () boolean
+ (location pointer))
+
+(defmacro with-gvalue ((gvalue &optional type value) &body body)
+ `(let ((,gvalue ,(if type
+ `(gvalue-new ,type ,value)
+ `(gvalue-new))))
+ (unwind-protect
+ (progn
+ ,@body
+ ,(unless type `(gvalue-get ,gvalue)))
+ (gvalue-free ,gvalue))))