Document which type are nullable, and wire format for null value
authorIan Douglas Scott <idscott@system76.com>
Wed, 13 Jul 2022 04:23:55 +0000 (21:23 -0700)
committerIan Douglas Scott <idscott@system76.com>
Thu, 14 Jul 2022 15:38:49 +0000 (08:38 -0700)
Signed-off-by: Ian Douglas Scott <idscott@system76.com>
doc/publican/sources/Protocol.xml
src/wayland-util.h

index 580cecb..57d8835 100644 (file)
            <para>
              Starts with an unsigned 32-bit length (including null terminator),
              followed by the string contents, including terminating null byte,
-             then padding to a 32-bit boundary.
+             then padding to a 32-bit boundary. A null value is represented
+             with a length of 0.
            </para>
          </listitem>
        </varlistentry>
          <term>object</term>
          <listitem>
            <para>
-             32-bit object ID.
+             32-bit object ID. A null value is represented with an ID of 0.
            </para>
          </listitem>
        </varlistentry>
index 18c512e..4d59231 100644 (file)
@@ -118,7 +118,7 @@ struct wl_object;
  * * `n`: new_id
  * * `a`: array
  * * `h`: fd
- * * `?`: following argument is nullable
+ * * `?`: following argument (`o` or `s`) is nullable
  *
  * While demarshaling primitive arguments is straightforward, when demarshaling
  * messages containing `object` or `new_id` arguments, the protocol