mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
Merge branch '896-variant-type-docs' into 'master'
Documentation and typing improvements for GVariant bytes Closes #896 See merge request GNOME/glib!117
This commit is contained in:
@@ -563,7 +563,10 @@
|
||||
<title>Bytestrings</title>
|
||||
<para>
|
||||
The bytestring syntax is a piece of syntactic sugar meant to complement the bytestring APIs in GVariant. It
|
||||
constructs arrays of non-nul bytes (type '<literal>ay</literal>') with a nul terminator at the end.
|
||||
constructs arrays of non-nul bytes (type '<literal>ay</literal>') with a nul terminator at the end. These are
|
||||
normal C strings with no particular encoding enforced, so the bytes may not be valid UTF-8.
|
||||
Bytestrings are a special case of byte arrays; byte arrays (also type '<literal>ay</literal>'), in the general
|
||||
case, can contain nul at any position, and need not end with nul.
|
||||
</para>
|
||||
<para>
|
||||
Bytestrings are specified with either <literal>b""</literal> or <literal>b''</literal>. As with strings,
|
||||
|
@@ -984,7 +984,7 @@ data = g_variant_new_parsed ("(%o, {'brightness': {'value': <%i>, 'max': <%i>}})
|
||||
|
||||
<para>
|
||||
The '<literal>^</literal>' character currently supports conversion to and from bytestrings or to and from arrays
|
||||
of strings or bytestrings. It has a number of forms.
|
||||
of strings or bytestrings. It does not support byte arrays. It has a number of forms.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user