Package: glib

Function glib:variant-new-from-bytes

Lambda List

glib:variant-new-from-bytes (vtype bytes &optional trusted)

Arguments

vtype -- a g:variant-type instance, or a valid type string
bytes -- a g:bytes instance
trusted -- an optional boolean whether the contents of bytes are trusted, or the default false value

Return Value

The new g:variant instance with a floating reference.

Details

Constructs a new serialised-mode g:variant instance. This is the inner interface for creation of new serialised values that gets called from various functions in the C library. A reference is taken on bytes.

The data in bytes must be aligned appropriately for the type being loaded. Otherwise this function will internally create a copy of the memory.
 

See also

2025-05-04