mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
scanner: support "since" attribute for enum entries
This was already in the DTD but not supported by the scanner.
The check for ever-increasing "since" tags is not strictly required for enum
entries as we control the binary value. But it keeps the xml file in
good order, preventing things like:
<entry name="first" value="…" />
<entry name="second" value="…" since="3"/>
<entry name="third" value="…" since="2"/>
<entry name="fourth" value="…" since="3"/>
If this is undesirable in the future the check can be removed without
side-effects.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
6c481003a2
commit
f8ab47690c
8 changed files with 131 additions and 7 deletions
|
|
@ -61,6 +61,29 @@ struct intf_not_here;
|
|||
*/
|
||||
extern const struct wl_interface intf_A_interface;
|
||||
|
||||
#ifndef INTF_A_FOO_ENUM
|
||||
#define INTF_A_FOO_ENUM
|
||||
enum intf_A_foo {
|
||||
/**
|
||||
* this is the first
|
||||
*/
|
||||
INTF_A_FOO_FIRST = 0,
|
||||
/**
|
||||
* this is the second
|
||||
*/
|
||||
INTF_A_FOO_SECOND = 1,
|
||||
/**
|
||||
* this is the third
|
||||
* @since 2
|
||||
*/
|
||||
INTF_A_FOO_THIRD = 2,
|
||||
};
|
||||
/**
|
||||
* @ingroup iface_intf_A
|
||||
*/
|
||||
#define INTF_A_FOO_THIRD_SINCE_VERSION 2
|
||||
#endif /* INTF_A_FOO_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_intf_A
|
||||
* @struct intf_A_listener
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue