diff options
author | Eric Blake <eblake@redhat.com> | 2015-05-14 06:50:48 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-05-14 18:20:42 +0200 |
commit | 18df515ebbefa9f13474b128b8050d5fa346ea1e (patch) | |
tree | 98ab9f86e6ffadc62bf753da6090078f64184c4f /scripts/qapi-types.py | |
parent | 47299262de424af0cb69965d082e5e70b2314183 (diff) |
qapi: Rename identical c_fun()/c_var() into c_name()
Now that the two functions are identical, we only need one of them,
and we might as well give it a more descriptive name. Basically,
the function serves as the translation from a QAPI name into a
(portion of a) C identifier, without regards to whether it is a
variable or function name.
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r-- | scripts/qapi-types.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 2bf8145076..e74cabece0 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -68,11 +68,11 @@ def generate_struct_fields(members): ret += mcgen(''' bool has_%(c_name)s; ''', - c_name=c_var(argname)) + c_name=c_name(argname)) ret += mcgen(''' %(c_type)s %(c_name)s; ''', - c_type=c_type(argentry), c_name=c_var(argname)) + c_type=c_type(argentry), c_name=c_name(argname)) return ret @@ -184,7 +184,7 @@ const int %(name)s_qtypes[QTYPE_MAX] = { ''', qtype = qtype, abbrev = de_camel_case(name).upper(), - enum = c_fun(de_camel_case(key),False).upper()) + enum = c_name(de_camel_case(key),False).upper()) ret += mcgen(''' }; @@ -221,7 +221,7 @@ struct %(name)s %(c_type)s %(c_name)s; ''', c_type=c_type(typeinfo[key]), - c_name=c_fun(key)) + c_name=c_name(key)) ret += mcgen(''' }; |