mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: qapi-types: add C99 index names to arrays monitor: Fix missing err = NULL in client_migrate_info() balloon: Fix typo hmp: Fix warning from smatch (wrong argument in function call) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
041ccc922e
4 changed files with 13 additions and 9 deletions
|
@ -123,16 +123,19 @@ const char *%(name)s_lookup[] = {
|
|||
name=name)
|
||||
i = 0
|
||||
for value in values:
|
||||
index = generate_enum_full_value(name, value)
|
||||
ret += mcgen('''
|
||||
"%(value)s",
|
||||
[%(index)s] = "%(value)s",
|
||||
''',
|
||||
value=value)
|
||||
index = index, value = value)
|
||||
|
||||
max_index = generate_enum_full_value(name, 'MAX')
|
||||
ret += mcgen('''
|
||||
NULL,
|
||||
[%(max_index)s] = NULL,
|
||||
};
|
||||
|
||||
''')
|
||||
''',
|
||||
max_index=max_index)
|
||||
return ret
|
||||
|
||||
def generate_enum(name, values):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue