(fn (get-stable-pointer-value function-id))
(fn-result (call-with-restarts fn args)))
(when return-type
- (set-g-value return-value fn-result return-type))))
+ (set-g-value return-value fn-result return-type :g-value-init nil))))
(defun parse-closure-arguments (count-of-args args)
(loop
(+g-type-interface+ (parse-gvalue-object gvalue))
(t (error "Unknown type: ~A (~A)" type (g-type-name type))))))))
-(defun set-g-value (gvalue value type &key zero-g-value unset-g-value)
+(defun set-g-value (gvalue value type &key zero-g-value unset-g-value (g-value-init t))
(cond
(zero-g-value (g-value-zero gvalue))
(unset-g-value (g-value-unset gvalue)))
- (g-value-init gvalue type)
+ (when g-value-init (g-value-init gvalue type))
(let ((fundamental-type (g-type-fundamental type)))
(cond
((= type (g-strv-get-type)) (g-value-set-boxed gvalue (convert-to-foreign value 'glib:gstrv)))