From 60827b862e4f0ef2b5117df30494a7f5918dd8b1 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 12 Jul 2022 21:23:55 -0700 Subject: [PATCH] Document which type are nullable, and wire format for null value Signed-off-by: Ian Douglas Scott --- doc/publican/sources/Protocol.xml | 5 +++-- src/wayland-util.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/publican/sources/Protocol.xml b/doc/publican/sources/Protocol.xml index 580cecb..57d8835 100644 --- a/doc/publican/sources/Protocol.xml +++ b/doc/publican/sources/Protocol.xml @@ -151,7 +151,8 @@ 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. @@ -159,7 +160,7 @@ object - 32-bit object ID. + 32-bit object ID. A null value is represented with an ID of 0. diff --git a/src/wayland-util.h b/src/wayland-util.h index 18c512e..4d59231 100644 --- a/src/wayland-util.h +++ b/src/wayland-util.h @@ -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