aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-07-01 12:59:40 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 15:47:13 +0200
commit016a335bd8ca624f43adbb08fa1698c29ec52a1a (patch)
tree3e5d18605738c7a54dc4c0c43eae29766295eb6e /scripts
parent00dfc3b2c272d98556ec6095d56bdd8b036babf9 (diff)
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi-event.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py
index 56bc602a6d..cc74f4dc22 100644
--- a/scripts/qapi-event.py
+++ b/scripts/qapi-event.py
@@ -267,7 +267,7 @@ fdecl.write(mcgen('''
exprs = parse_schema(input_file)
-event_enum_name = prefix.upper().replace('-', '_') + "QAPIEvent"
+event_enum_name = c_name(prefix + "QAPIEvent", protect=False)
event_enum_values = []
event_enum_strings = []