mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Rename generate_enum_full_value() to c_enum_const()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
fa6068a1e8
commit
7c81c61f9c
4 changed files with 10 additions and 11 deletions
|
@ -118,13 +118,13 @@ const char *%(name)s_lookup[] = {
|
|||
name=name)
|
||||
i = 0
|
||||
for value in values:
|
||||
index = generate_enum_full_value(name, value)
|
||||
index = c_enum_const(name, value)
|
||||
ret += mcgen('''
|
||||
[%(index)s] = "%(value)s",
|
||||
''',
|
||||
index = index, value = value)
|
||||
|
||||
max_index = generate_enum_full_value(name, 'MAX')
|
||||
max_index = c_enum_const(name, 'MAX')
|
||||
ret += mcgen('''
|
||||
[%(max_index)s] = NULL,
|
||||
};
|
||||
|
@ -150,7 +150,7 @@ typedef enum %(name)s
|
|||
|
||||
i = 0
|
||||
for value in enum_values:
|
||||
enum_full_value = generate_enum_full_value(name, value)
|
||||
enum_full_value = c_enum_const(name, value)
|
||||
enum_decl += mcgen('''
|
||||
%(enum_full_value)s = %(i)d,
|
||||
''',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue