[Xcb] new "length" element needs a type?

Tycho Andersen tycho at tycho.pizza
Sun Sep 19 13:34:43 UTC 2021


There is a new length element for structs documented in c36dde3f4535
("Add element to specify expression that defines length of a struct")
with a first use introduced in f0db8b7d31a3 ("xinput: Add length
specification for DeviceClass struct"), but as near as I can tell
there's no type information for this, either in the docs or in this
particular usage.

Perhaps we should apply something like the below patch? Or is there
another way to figure this out that I've missed?



>From 36a4ed26ab962bbd9f1943185c6cced27bf1e8d5 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho at tycho.pizza>
Date: Sun, 19 Sep 2021 07:32:03 -0600
Subject: [PATCH] xinput: specify type of length for DeviceClass

Most (all?) other expressions within elements have type information
derivable from a type or similar attribute. Let's do the same for length

Signed-off-by: Tycho Andersen <tycho at tycho.pizza>
 src/xinput.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xinput.xml b/src/xinput.xml
index 3610645..a507d64 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1689,7 +1689,7 @@ authorization from the authors.
     <struct name="DeviceClass">
-        <length>
+        <length type="CARD32">
             <op op="*">

base-commit: f0db8b7d31a379fe26f6cc592be997c8ce5f0b2d

More information about the Xcb mailing list