GVariant instance that has the same value as
value and is
trusted to be in normal form.
value is already trusted to be in normal form then a new
value is returned.
value is not already trusted, then it is scanned to check if it
is in normal form. If it is found to be in normal form then it is
marked as trusted and a new reference to it is returned.
value is found not to be in normal form then a new trusted
GVariant is created with the same value as
It makes sense to call this function if you’ve received
data from untrusted sources and you want to ensure your serialized
output is definitely in normal form.
value is already in normal form, a new reference will be returned
(which will be floating if
value is floating). If it is not in normal form,
the newly created
GVariant will be returned with a single non-floating
g_variant_take_ref() should be called on the return
value from this function to guarantee ownership of a single non-floating
reference to it.
Available since: 2.24
|The caller of the method takes ownership of the data, and is responsible for freeing it.|