mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qapi-event: Clean up how name of enum QAPIEvent is made
Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, which is an improvement in my book. Unbreaks prefix containing '.', but other funny characters remain broken. To be fixed next. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
00dfc3b2c2
commit
016a335bd8
3 changed files with 6 additions and 6 deletions
|
@ -826,7 +826,7 @@ Example:
|
|||
QDECREF(qmp);
|
||||
}
|
||||
|
||||
const char *EXAMPLE_QAPIEvent_lookup[] = {
|
||||
const char *example_QAPIEvent_lookup[] = {
|
||||
"MY_EVENT",
|
||||
NULL,
|
||||
};
|
||||
|
@ -843,11 +843,11 @@ Example:
|
|||
|
||||
void qapi_event_send_my_event(Error **errp);
|
||||
|
||||
extern const char *EXAMPLE_QAPIEvent_lookup[];
|
||||
typedef enum EXAMPLE_QAPIEvent
|
||||
extern const char *example_QAPIEvent_lookup[];
|
||||
typedef enum example_QAPIEvent
|
||||
{
|
||||
EXAMPLE_QAPI_EVENT_MY_EVENT = 0,
|
||||
EXAMPLE_QAPI_EVENT_MAX = 1,
|
||||
} EXAMPLE_QAPIEvent;
|
||||
} example_QAPIEvent;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue