From 016a335bd8ca624f43adbb08fa1698c29ec52a1a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 1 Jul 2015 12:59:40 +0200 Subject: 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 Reviewed-by: Eric Blake --- scripts/qapi-event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index 56bc602..cc74f4d 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 = [] -- cgit v1.1