qapi-event: Eliminate global variable event_enum_value
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-11-git-send-email-armbru@redhat.com>
This commit is contained in:
parent
efd2eaa6c2
commit
7b24626cd0
@ -137,7 +137,7 @@ def generate_event_implement(api_name, event_name, params):
|
||||
emit(%(event_enum_value)s, qmp, &local_err);
|
||||
|
||||
""",
|
||||
event_enum_value = event_enum_value)
|
||||
event_enum_value = c_enum_const(event_enum_name, event_name))
|
||||
|
||||
# step 5: clean up
|
||||
if params:
|
||||
@ -223,7 +223,6 @@ for expr in exprs:
|
||||
fdecl.write(ret)
|
||||
|
||||
# We need an enum value per event
|
||||
event_enum_value = c_enum_const(event_enum_name, event_name)
|
||||
ret = generate_event_implement(api_name, event_name, params)
|
||||
fdef.write(ret)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user