Package: gobject

Macro gobject:with-value

Lambda List

gobject:with-value ((var &rest args) &body body)

Syntax

(g:with-value (gvalue) body) => result
(g:with-value (gvalue gtype) body) => result
(g:with-value (gvalue gtype value) body) => result

Arguments

gvalue -- a g:value instance to create and initialize
gtype -- an optional g:type-t type ID
value -- an optional value corresponding to gtype to set

Details

The g:with-value macro allocates a new g:value instance, initializes it with the given values and executes the body that uses gvalue. After execution of the body the g:value-unset function is called on gvalue. This clears the current value in gvalue, unsets the type and releases all resources associated with gvalue.

Notes

The gvalue parameter is initialized with the g:value-init function and unset with the g:value-unset function. The optional value ist set with the g:value-set function.
 

See also

2024-12-21