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.

Backports commit 016a335bd8ca624f43adbb08fa1698c29ec52a1a from qemu
This commit is contained in:
Markus Armbruster 2018-02-19 16:06:33 -05:00 committed by Lioncash
parent 6dcb71a788
commit 2c3f6e4175
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -266,7 +266,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 = []