Christian Linhart
2017-01-20 18:07:45 UTC
member event_type_base in struct InputClassInfo is a CARD8.
This patch replaces the type with the new typedef EventTypeBase
which is defined as a CARD8.
This does not alter the ABI or API for that struct because
typedefs do not appear in the ABI.
And C handles typedefs as aliases.
So there'll be no API issues as well.
The libxcb generator adds additional functions that implement
an iterator over this type.
This is harmless because adding code is ABI/API compatible.
The purpose of this change is to add more semantic info to this
member variable of this struct.
This helps with xcb-based generators or automatic code-checkers
and things like that.
Signed-off-by: Christian Linhart <***@demorecorder.com>
---
src/xinput.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index 94855ba..c0b497e 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -222,18 +222,19 @@ <request name="ListInputDevices" opcode="2">
<fieldref>devices_len</fieldref>
</list>
<pad align="4" />
</reply>
</request>
<!-- OpenDevice -->
+ <typedef oldname="CARD8" newname="EventTypeBase" />
<struct name="InputClassInfo">
<field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="event_type_base" />
+ <field type="EventTypeBase" name="event_type_base" />
</struct>
<request name="OpenDevice" opcode="3">
<field type="CARD8" name="device_id" />
<pad bytes="3" />
<reply>
<field type="CARD8" name="xi_reply_type" />
This patch replaces the type with the new typedef EventTypeBase
which is defined as a CARD8.
This does not alter the ABI or API for that struct because
typedefs do not appear in the ABI.
And C handles typedefs as aliases.
So there'll be no API issues as well.
The libxcb generator adds additional functions that implement
an iterator over this type.
This is harmless because adding code is ABI/API compatible.
The purpose of this change is to add more semantic info to this
member variable of this struct.
This helps with xcb-based generators or automatic code-checkers
and things like that.
Signed-off-by: Christian Linhart <***@demorecorder.com>
---
src/xinput.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index 94855ba..c0b497e 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -222,18 +222,19 @@ <request name="ListInputDevices" opcode="2">
<fieldref>devices_len</fieldref>
</list>
<pad align="4" />
</reply>
</request>
<!-- OpenDevice -->
+ <typedef oldname="CARD8" newname="EventTypeBase" />
<struct name="InputClassInfo">
<field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="event_type_base" />
+ <field type="EventTypeBase" name="event_type_base" />
</struct>
<request name="OpenDevice" opcode="3">
<field type="CARD8" name="device_id" />
<pad bytes="3" />
<reply>
<field type="CARD8" name="xi_reply_type" />
--
2.1.4
2.1.4