gvariant-text: fix bytestring example

ord('a') == 97 == 0x61 != 0x97.

    >>> GLib.Variant.parse(None, "[byte 0x97, 0x98, 0x99, 0]", None, None)
    GLib.Variant('ay', b'\227\230\231')
    >>> GLib.Variant.parse(None, "[byte 0x61, 0x62, 0x63, 0]", None, None)
    GLib.Variant('ay', b'abc')
This commit is contained in:
Will Thompson 2018-06-22 10:01:58 +01:00
parent 04c8691208
commit 2e7d22a3bd
No known key found for this signature in database
GPG Key ID: 3422DC0D7AD482A7

View File

@ -579,7 +579,7 @@
forms <literal>\0nnn</literal> and <literal>\xnn</literal>. forms <literal>\0nnn</literal> and <literal>\xnn</literal>.
</para> </para>
<para> <para>
<literal>b'abc'</literal> is equivalent to <literal>[byte 0x97, 0x98, 0x99, 0]</literal>. <literal>b'abc'</literal> is equivalent to <literal>[byte 0x61, 0x62, 0x63, 0]</literal>.
</para> </para>
<para> <para>
When formatting arrays of bytes, the printer will choose to display the array as a bytestring if it contains When formatting arrays of bytes, the printer will choose to display the array as a bytestring if it contains